Spaces:
Build error
Build error
Commit
Β·
c6923f5
1
Parent(s):
ba399d6
Update app.py
Browse files
app.py
CHANGED
|
@@ -20,7 +20,7 @@ def get_first_subword(word):
|
|
| 20 |
|
| 21 |
def search(token_to_lookup, num_neighbors):
|
| 22 |
i = get_first_subword(token_to_lookup)
|
| 23 |
-
_ , I = index.search(input_embeddings[i:i+1], num_neighbors)
|
| 24 |
hits = lookup_table.take(I[0])
|
| 25 |
return hits.values[1:]
|
| 26 |
|
|
|
|
| 20 |
|
| 21 |
def search(token_to_lookup, num_neighbors):
|
| 22 |
i = get_first_subword(token_to_lookup)
|
| 23 |
+
_ , I = index.search(input_embeddings[i:i+1], num_neighbors=50)
|
| 24 |
hits = lookup_table.take(I[0])
|
| 25 |
return hits.values[1:]
|
| 26 |
|