Spaces:
Building
Building
Update app.py
Browse files
app.py
CHANGED
@@ -7,8 +7,8 @@ embedding_model = SentenceTransformer('all-MiniLM-L6-v2')
|
|
7 |
# Define the function to process requests
|
8 |
def generate_embeddings(chunks):
|
9 |
embeddings = embedding_model.encode(chunks, convert_to_tensor=False)
|
10 |
-
|
11 |
-
|
12 |
|
13 |
# Define the Gradio interface
|
14 |
interface = gr.Interface(
|
|
|
7 |
# Define the function to process requests
|
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(
|