Spaces:
Runtime error
Runtime error
Commit
·
aaaa74b
1
Parent(s):
71dd437
Update app.py
Browse files
app.py
CHANGED
|
@@ -7,10 +7,9 @@ model_Q = SentenceTransformer('flax-sentence-embeddings/multi-QA_v1-mpnet-asymme
|
|
| 7 |
def getVectors(sentences):
|
| 8 |
vectors = []
|
| 9 |
splitSentences = sentences.split('ZZZ')
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
return splitSentences
|
| 14 |
|
| 15 |
interface = gr.Interface(fn = getVectors,
|
| 16 |
inputs = "text",
|
|
|
|
| 7 |
def getVectors(sentences):
|
| 8 |
vectors = []
|
| 9 |
splitSentences = sentences.split('ZZZ')
|
| 10 |
+
for sentence in sentences:
|
| 11 |
+
vectors.append(model_Q.encode(sentence))
|
| 12 |
+
return vectors[0]
|
|
|
|
| 13 |
|
| 14 |
interface = gr.Interface(fn = getVectors,
|
| 15 |
inputs = "text",
|