Spaces:
Build error
Build error
Commit
Β·
b69c5b6
1
Parent(s):
4823942
Update app.py
Browse files
app.py
CHANGED
@@ -18,7 +18,7 @@ def get_first_subword(word):
|
|
18 |
except:
|
19 |
return tokenizer(word, add_special_tokens=False)['input_ids'][0]
|
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])
|
|
|
18 |
except:
|
19 |
return tokenizer(word, add_special_tokens=False)['input_ids'][0]
|
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])
|