Update app.py
Browse files
app.py
CHANGED
|
@@ -65,7 +65,7 @@ def fill_masked(text: str, model_name: str, top_k: int):
|
|
| 65 |
"token": cand["token_str"]
|
| 66 |
})
|
| 67 |
res_dict[mask_num] = formatted
|
| 68 |
-
elif
|
| 69 |
formatted = []
|
| 70 |
for cand in mas_results:
|
| 71 |
formatted.append({
|
|
|
|
| 65 |
"token": cand["token_str"]
|
| 66 |
})
|
| 67 |
res_dict[mask_num] = formatted
|
| 68 |
+
elif isinstance(results, list):
|
| 69 |
formatted = []
|
| 70 |
for cand in mas_results:
|
| 71 |
formatted.append({
|