codeblacks commited on
Commit
0b76df3
·
verified ·
1 Parent(s): 9bb4ce0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
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
- print (embeddings.shape)
11
- return embeddings # Convert tensor to list for Gradio
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(