isonuma commited on
Commit
7db7298
1 Parent(s): 4e5672e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
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=100)
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)}候補)"