Update app.py
Browse files
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()
|