Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -125,7 +125,7 @@ def masking(text, k):
|
|
| 125 |
best_positions = [text_split.index(prediction) for prediction in best_predictions]
|
| 126 |
|
| 127 |
if k == 1:
|
| 128 |
-
text = f"The most likely missing species is
|
| 129 |
elif k == 2:
|
| 130 |
text = f"The most likely missing species are {', '.join(best_predictions[:-1].capitalize())} and {best_predictions[-1].capitalize()} (positions {', '.join(map(str, best_positions[:-1]))} and {best_positions[-1]})."
|
| 131 |
else:
|
|
|
|
| 125 |
best_positions = [text_split.index(prediction) for prediction in best_predictions]
|
| 126 |
|
| 127 |
if k == 1:
|
| 128 |
+
text = f"The most likely missing species is {best_predictions[0].capitalize()} (position {best_positions[0]})."
|
| 129 |
elif k == 2:
|
| 130 |
text = f"The most likely missing species are {', '.join(best_predictions[:-1].capitalize())} and {best_predictions[-1].capitalize()} (positions {', '.join(map(str, best_positions[:-1]))} and {best_positions[-1]})."
|
| 131 |
else:
|