codeblacks commited on
Commit
ef16b6d
·
verified ·
1 Parent(s): 0551a11

Update app.py

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