Update app.py
Browse files
app.py
CHANGED
|
@@ -63,22 +63,4 @@ def predict(text):
|
|
| 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()
|
| 69 |
-
model = getModel()
|
| 70 |
-
masker = {0: 'αα', 1: 'ααα', 2: 'ααα€α'}
|
| 71 |
-
|
| 72 |
-
while True:
|
| 73 |
-
sentence = input("α¨ααα§ααααα α¬ααααααααα: ")
|
| 74 |
-
masked = getMasked(sentence)
|
| 75 |
-
context = model(masked)[0]['token_str']
|
| 76 |
-
print(context)
|
| 77 |
-
|
| 78 |
-
if context == masker[0]:
|
| 79 |
-
print("ααααααα ααααα§ααααα£ααα, α αααα αͺ ααα αα¦α")
|
| 80 |
-
elif context == masker[1]:
|
| 81 |
-
print("ααααααα ααααα§ααααα£ααα, α αααα αͺ ααααααα")
|
| 82 |
-
else:
|
| 83 |
-
print("ααααααα ααααα§ααααα£ααα, α αααα αͺ ααα€α")
|
| 84 |
-
print("\n")
|
|
|
|
| 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(share=True)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|