davmel commited on
Commit
4b8857b
Β·
verified Β·
1 Parent(s): 4fa6c7b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
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()