Surajrgl commited on
Commit
e3805eb
1 Parent(s): 1f3339d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -6
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).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")
 
6
 
7
  def generate_embedding(query):
8
  # return "Connected"
9
+ embeddings = model.encode(query)
10
+ resposne = ""
11
+ for(char in embeddings.tolist()):
12
+ resposne += str(char) + " "
13
+ # mySeparator = " "
14
+ # resposne = mySeparator.join(embeddings.tolist())
15
  return resposne
16
 
17
  demo = gr.Interface(fn=generate_embedding, inputs="text", outputs="text")