Update app.py
Browse files
app.py
CHANGED
@@ -36,7 +36,7 @@ if query != "" and is_hiragana_or_katakana(query):
|
|
36 |
else:
|
37 |
# top_candidates = [query]
|
38 |
# top_losses = [0.0]
|
39 |
-
top_candidates, top_losses = search_candidates(query, query_candidates, model=model, tokenizer=tokenizer, top_k=
|
40 |
answers = ["{}: {:.2f}".format(top_candidates[index], top_losses[index]) for index in range(min(len(top_candidates), 10))]
|
41 |
value = "\n".join(answers)
|
42 |
value += f"\n({len(top_candidates)}候補)"
|
|
|
36 |
else:
|
37 |
# top_candidates = [query]
|
38 |
# top_losses = [0.0]
|
39 |
+
top_candidates, top_losses = search_candidates(query, query_candidates, model=model, tokenizer=tokenizer, top_k=10)
|
40 |
answers = ["{}: {:.2f}".format(top_candidates[index], top_losses[index]) for index in range(min(len(top_candidates), 10))]
|
41 |
value = "\n".join(answers)
|
42 |
value += f"\n({len(top_candidates)}候補)"
|