Surajrgl commited on
Commit
1f3339d
·
1 Parent(s): 09ceb31

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -6,12 +6,12 @@ model = SentenceTransformer('sentence-transformers/multi-qa-mpnet-base-cos-v1')
6
 
7
  def generate_embedding(query):
8
  # return "Connected"
9
- embeddings = model.encode(query)
10
  # resposne = ""
11
  # for(char in embeddings):
12
  # resposne += char + " "
13
  mySeparator = " "
14
- resposne = embeddings.join(mySeparator)
15
  return resposne
16
 
17
  demo = gr.Interface(fn=generate_embedding, inputs="text", outputs="text")
 
6
 
7
  def generate_embedding(query):
8
  # return "Connected"
9
+ embeddings = model.encode(query).tolist()
10
  # resposne = ""
11
  # for(char in embeddings):
12
  # resposne += char + " "
13
  mySeparator = " "
14
+ resposne = mySeparator.join(embeddings)
15
  return resposne
16
 
17
  demo = gr.Interface(fn=generate_embedding, inputs="text", outputs="text")