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