Surajrgl commited on
Commit
cec2471
·
1 Parent(s): 1004c2f

Update app.py

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