Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -6,8 +6,8 @@ embedding_model = SentenceTransformer('all-MiniLM-L6-v2')
|
|
| 6 |
|
| 7 |
# Define the function to process requests
|
| 8 |
def generate_embeddings(chunks):
|
| 9 |
-
embeddings = embedding_model.encode(chunks, convert_to_tensor=
|
| 10 |
-
return embeddings
|
| 11 |
|
| 12 |
# Define the Gradio interface
|
| 13 |
interface = gr.Interface(
|
|
|
|
| 6 |
|
| 7 |
# Define the function to process requests
|
| 8 |
def generate_embeddings(chunks):
|
| 9 |
+
embeddings = embedding_model.encode(chunks, convert_to_tensor=False)
|
| 10 |
+
return embeddings # Convert tensor to list for Gradio
|
| 11 |
|
| 12 |
# Define the Gradio interface
|
| 13 |
interface = gr.Interface(
|