starmaq commited on
Commit
0cbead6
·
1 Parent(s): f84e003

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -5,7 +5,7 @@ from sentence_transformers import SentenceTransformer
5
  model = SentenceTransformer('sentence-transformers/all-MiniLM-L6-v2')
6
 
7
  def give_embeddings(sentence):
8
- return json.dumps(model.encode([sentence])[0])
9
 
10
  demo = gr.Interface(fn=give_embeddings, inputs="text", outputs="text")
11
  demo.launch()
 
5
  model = SentenceTransformer('sentence-transformers/all-MiniLM-L6-v2')
6
 
7
  def give_embeddings(sentence):
8
+ return json.dumps(model.encode([sentence])[0].tolist())
9
 
10
  demo = gr.Interface(fn=give_embeddings, inputs="text", outputs="text")
11
  demo.launch()