Spaces:
Runtime error
Runtime error
Fawaz
commited on
Commit
·
993b51c
1
Parent(s):
6be899e
Add application file
Browse files
app.py
CHANGED
|
@@ -104,7 +104,7 @@ print(len(combined_list))
|
|
| 104 |
|
| 105 |
embeddings1 = model.encode(combined_list)
|
| 106 |
|
| 107 |
-
def semantic_search(query
|
| 108 |
query_embedding = model.encode(query)
|
| 109 |
|
| 110 |
document_embeddings = embeddings1
|
|
@@ -118,7 +118,7 @@ def semantic_search(query, embeddings1, combined_list):
|
|
| 118 |
print("Most similar document", most_similar_doc)
|
| 119 |
return ls1
|
| 120 |
|
| 121 |
-
output = semantic_search("لذهب بعشرة آلاف دولار؟"
|
| 122 |
|
| 123 |
ranked = sorted(output, key=lambda x: x[1])
|
| 124 |
ranked[:3]
|
|
|
|
| 104 |
|
| 105 |
embeddings1 = model.encode(combined_list)
|
| 106 |
|
| 107 |
+
def semantic_search(query):
|
| 108 |
query_embedding = model.encode(query)
|
| 109 |
|
| 110 |
document_embeddings = embeddings1
|
|
|
|
| 118 |
print("Most similar document", most_similar_doc)
|
| 119 |
return ls1
|
| 120 |
|
| 121 |
+
output = semantic_search("لذهب بعشرة آلاف دولار؟")
|
| 122 |
|
| 123 |
ranked = sorted(output, key=lambda x: x[1])
|
| 124 |
ranked[:3]
|