Update app.py
Browse files
app.py
CHANGED
|
@@ -54,15 +54,15 @@ def predict(text):
|
|
| 54 |
# Extract the predicted word and score
|
| 55 |
context = predictions[0]["token_str"]
|
| 56 |
if context == masker[0]:
|
| 57 |
-
return "
|
| 58 |
elif context == masker[1]:
|
| 59 |
-
return "
|
| 60 |
else:
|
| 61 |
-
return "
|
| 62 |
|
| 63 |
# Create the Gradio interface
|
| 64 |
iface = gr.Interface(fn=predict, inputs="text", outputs="text", title="Homonym disambiguation in Georgian",
|
| 65 |
-
description="Enter a sentence with the homonym \"ααα α\"")
|
| 66 |
iface.launch()
|
| 67 |
|
| 68 |
exit()
|
|
|
|
| 54 |
# Extract the predicted word and score
|
| 55 |
context = predictions[0]["token_str"]
|
| 56 |
if context == masker[0]:
|
| 57 |
+
return "Homonym is used as a \"Shovel\""
|
| 58 |
elif context == masker[1]:
|
| 59 |
+
return "Homonym is used as a \"Lowland\""
|
| 60 |
else:
|
| 61 |
+
return "Homonym is used as a \"Cafe\""
|
| 62 |
|
| 63 |
# Create the Gradio interface
|
| 64 |
iface = gr.Interface(fn=predict, inputs="text", outputs="text", title="Homonym disambiguation in Georgian",
|
| 65 |
+
description="Enter a sentence with the homonym \"ααα α\" (for the current purposes, please include the homonym once in the sentence")
|
| 66 |
iface.launch()
|
| 67 |
|
| 68 |
exit()
|