Update app.py
Browse files
app.py
CHANGED
|
@@ -58,7 +58,7 @@ def fill_masked(text: str, model_name: str, top_k: int):
|
|
| 58 |
if isinstance(results[0], list):
|
| 59 |
for mask_num, mas_results in enumerate(results):
|
| 60 |
formatted = []
|
| 61 |
-
for cand in
|
| 62 |
formatted.append({
|
| 63 |
"sequence": cand["sequence"],
|
| 64 |
"score": round(cand["score"], 4),
|
|
@@ -67,7 +67,7 @@ def fill_masked(text: str, model_name: str, top_k: int):
|
|
| 67 |
res_dict[mask_num] = formatted
|
| 68 |
elif isinstance(results, list):
|
| 69 |
formatted = []
|
| 70 |
-
for cand in
|
| 71 |
formatted.append({
|
| 72 |
"sequence": cand["sequence"],
|
| 73 |
"score": round(cand["score"], 4),
|
|
|
|
| 58 |
if isinstance(results[0], list):
|
| 59 |
for mask_num, mas_results in enumerate(results):
|
| 60 |
formatted = []
|
| 61 |
+
for cand in mask_results:
|
| 62 |
formatted.append({
|
| 63 |
"sequence": cand["sequence"],
|
| 64 |
"score": round(cand["score"], 4),
|
|
|
|
| 67 |
res_dict[mask_num] = formatted
|
| 68 |
elif isinstance(results, list):
|
| 69 |
formatted = []
|
| 70 |
+
for cand in results:
|
| 71 |
formatted.append({
|
| 72 |
"sequence": cand["sequence"],
|
| 73 |
"score": round(cand["score"], 4),
|