Commit
ยท
6f55e41
1
Parent(s):
3edac1c
chore: Update TashkeelModelEO and TashkeelModelED loading in app.py
Browse files
app.py
CHANGED
@@ -50,6 +50,8 @@ def infer_catt(input_text, choose_model):
|
|
50 |
|
51 |
return output_text[0]
|
52 |
|
|
|
|
|
53 |
examples = ["ุงูุณูุงู
ุนูููู
ูุฑุญู
ุฉ ุงููู ูุจุฑูุงุชู", "ุงูุนูู
ููุฑ", "ุงูุญู
ุฏ ููู"]
|
54 |
|
55 |
with gr.Blocks(title="Arabic Tashkeel") as demo:
|
@@ -79,7 +81,7 @@ with gr.Blocks(title="Arabic Tashkeel") as demo:
|
|
79 |
gr.Examples(examples, text_input1, cache_examples=False)
|
80 |
|
81 |
submit_button1.click(infer_catt, inputs=[text_input1, choose_model], outputs=text_output1)
|
82 |
-
clear_button1.click(lambda: (
|
83 |
|
84 |
with gr.Tab(label="Shakkala"):
|
85 |
gr.HTML("<center><h2>Shakkala: Arabic Diacritization</h2></center>")
|
@@ -96,7 +98,7 @@ with gr.Blocks(title="Arabic Tashkeel") as demo:
|
|
96 |
)
|
97 |
|
98 |
submit_button2.click(infer_shakkala, inputs=text_input2, outputs=text_output2)
|
99 |
-
clear_button2.click(lambda: (
|
100 |
|
101 |
gr.Examples(examples, text_input2, cache_examples=False)
|
102 |
|
|
|
50 |
|
51 |
return output_text[0]
|
52 |
|
53 |
+
|
54 |
+
|
55 |
examples = ["ุงูุณูุงู
ุนูููู
ูุฑุญู
ุฉ ุงููู ูุจุฑูุงุชู", "ุงูุนูู
ููุฑ", "ุงูุญู
ุฏ ููู"]
|
56 |
|
57 |
with gr.Blocks(title="Arabic Tashkeel") as demo:
|
|
|
81 |
gr.Examples(examples, text_input1, cache_examples=False)
|
82 |
|
83 |
submit_button1.click(infer_catt, inputs=[text_input1, choose_model], outputs=text_output1)
|
84 |
+
clear_button1.click(lambda: ("", ""), outputs=[text_input1, text_output1])
|
85 |
|
86 |
with gr.Tab(label="Shakkala"):
|
87 |
gr.HTML("<center><h2>Shakkala: Arabic Diacritization</h2></center>")
|
|
|
98 |
)
|
99 |
|
100 |
submit_button2.click(infer_shakkala, inputs=text_input2, outputs=text_output2)
|
101 |
+
clear_button2.click(lambda: ("", ""), outputs=[text_input2, text_output2])
|
102 |
|
103 |
gr.Examples(examples, text_input2, cache_examples=False)
|
104 |
|