Spaces:
Running
Running
info update
Browse files
app.py
CHANGED
@@ -92,17 +92,21 @@ with gr.Blocks(title="Արեւմտահայերէն-Անգլերէն Մեքենա
|
|
92 |
Հոս կը ցուցադրուի առաջին արեւմտահայերէն-անգլերէն մեքենական թարգմանիչը, որ կարուցուած է Մեթայի (Ֆեյսպուքի) 'No Language Left Behind' տիպարի հիման վրայ։ Թարգմանութեան տիպարը կ'աշխատի CPU-ի մը մէջ, ուրեմն նախադասութեան մը թարգմանութիւնը կրնայ տեւել մօտաւորապէս 40-60 երկվայրկեան։ Ձեր գնահատութիւնները եւ քննադատութիւնները շատ կարեւոր են տիպարի թարգմանութեան որակը բարելաւելու համար։ Շնորհակալութիւն Գալուստ Կիւլպէնկեան Հիմնարկին, որուն աջակցութեամբ այս նախագիծը իրականացուեցաւ։
|
93 |
|
94 |
This is the demo of the first Western Armenian-English neural machine translation system which is based on Meta's 'No Language Left Behind' model. The model runs on a CPU, so it might take approximately 40-60 seconds to translate a single sentence. Your feedback and comments are very important for us to improve the quality of the translation. Thanks to the Calouste Gulbenkian Foundation for making this project possible with their support.
|
|
|
|
|
|
|
|
|
95 |
"""
|
96 |
)
|
97 |
|
98 |
with gr.Row():
|
99 |
with gr.Column():
|
100 |
-
text = gr.Textbox(lines=5, label="
|
101 |
with gr.Row():
|
102 |
src_lang = gr.Dropdown(LANGUAGES_LIST, type="value", label="Թարգմանէ Այս Լեզուէ | Source Language")
|
103 |
tgt_lang = gr.Dropdown(LANGUAGES_LIST, type="value", label="Թարգմանէ Այս Լեզուի | Target Language")
|
104 |
with gr.Column():
|
105 |
-
translated = gr.Textbox(lines=5, label="
|
106 |
translate_btn = gr.Button(value="Թարգմանէ | Translate", variant="primary")
|
107 |
with gr.Row():
|
108 |
with gr.Column():
|
@@ -119,7 +123,7 @@ with gr.Blocks(title="Արեւմտահայերէն-Անգլերէն Մեքենա
|
|
119 |
)
|
120 |
by_sentence = gr.Checkbox(label="Նախադասութիւններու Բաժնէ | Split into Sentences", value=True, info="Տուփը նշանագրեցէք եթէ կ'ուզէք ձեր գրութիւնը թարգմանուի նախադասութիւն առ նախադասութիւն։ Այս կերպով թարգմանուած նախադասութիւններուն որակը աւելի լաւ են։ | Check this box if you want to split your input text into sentences. This way the quality of the translation will be better.")
|
121 |
clean = gr.Checkbox(label="Մշակէ | Preprocess", value=True, info="Տուփը նշանագրեցէք եթէ կ'ուզէք ձեր գրութիւնը կանոնաւորուի ծրագրի կողմէ թարգմանութենէ առաջ։ Կանոնաւորումը թարգմանութեան որակի բարելաւման համար օգտակար է։ | Check this box if you want to preprocess your input text before translation. This way the quality of the translation will be better.")
|
122 |
-
num_beams = gr.Dropdown([1, 2, 3, 4, 5], type="value", label="
|
123 |
|
124 |
translate_btn.click(translate_wrapper, inputs=[text, src_lang, tgt_lang, by_sentence, clean, num_beams], outputs=translated)
|
125 |
|
|
|
92 |
Հոս կը ցուցադրուի առաջին արեւմտահայերէն-անգլերէն մեքենական թարգմանիչը, որ կարուցուած է Մեթայի (Ֆեյսպուքի) 'No Language Left Behind' տիպարի հիման վրայ։ Թարգմանութեան տիպարը կ'աշխատի CPU-ի մը մէջ, ուրեմն նախադասութեան մը թարգմանութիւնը կրնայ տեւել մօտաւորապէս 40-60 երկվայրկեան։ Ձեր գնահատութիւնները եւ քննադատութիւնները շատ կարեւոր են տիպարի թարգմանութեան որակը բարելաւելու համար։ Շնորհակալութիւն Գալուստ Կիւլպէնկեան Հիմնարկին, որուն աջակցութեամբ այս նախագիծը իրականացուեցաւ։
|
93 |
|
94 |
This is the demo of the first Western Armenian-English neural machine translation system which is based on Meta's 'No Language Left Behind' model. The model runs on a CPU, so it might take approximately 40-60 seconds to translate a single sentence. Your feedback and comments are very important for us to improve the quality of the translation. Thanks to the Calouste Gulbenkian Foundation for making this project possible with their support.
|
95 |
+
---
|
96 |
+
|
97 |
+
Դուք թարգմանութեան որակին մասին ձեր գնահատութիւնը կրնաք տալ երեք գնահատութեան կոճակներէ մէկուն սեղմելով։ Լեզուի, մուտքի եւ ելքի գրութիւններու, յարաչափերու եւ ձեր գնահատութեան մասին տուեալները պիտի պահուին։ Գնահատութիւնը պարտաւոր չէ։
|
98 |
+
You can give your feedback about the quality of the translation by clicking one of the three feedback buttons. Information about source, target languages, input and output texts, parameters and your feedback about quality will be saved. It is not mandatory to give feedback.
|
99 |
"""
|
100 |
)
|
101 |
|
102 |
with gr.Row():
|
103 |
with gr.Column():
|
104 |
+
text = gr.Textbox(lines=5, label="Մուտքագրում | Input Text")
|
105 |
with gr.Row():
|
106 |
src_lang = gr.Dropdown(LANGUAGES_LIST, type="value", label="Թարգմանէ Այս Լեզուէ | Source Language")
|
107 |
tgt_lang = gr.Dropdown(LANGUAGES_LIST, type="value", label="Թարգմանէ Այս Լեզուի | Target Language")
|
108 |
with gr.Column():
|
109 |
+
translated = gr.Textbox(lines=5, label="Ելքագրում | Output Text", interactive=False)
|
110 |
translate_btn = gr.Button(value="Թարգմանէ | Translate", variant="primary")
|
111 |
with gr.Row():
|
112 |
with gr.Column():
|
|
|
123 |
)
|
124 |
by_sentence = gr.Checkbox(label="Նախադասութիւններու Բաժնէ | Split into Sentences", value=True, info="Տուփը նշանագրեցէք եթէ կ'ուզէք ձեր գրութիւնը թարգմանուի նախադասութիւն առ նախադասութիւն։ Այս կերպով թարգմանուած նախադասութիւններուն որակը աւելի լաւ են։ | Check this box if you want to split your input text into sentences. This way the quality of the translation will be better.")
|
125 |
clean = gr.Checkbox(label="Մշակէ | Preprocess", value=True, info="Տուփը նշանագրեցէք եթէ կ'ուզէք ձեր գրութիւնը կանոնաւորուի ծրագրի կողմէ թարգմանութենէ առաջ։ Կանոնաւորումը թարգմանութեան որակի բարելաւման համար օգտակար է։ | Check this box if you want to preprocess your input text before translation. This way the quality of the translation will be better.")
|
126 |
+
num_beams = gr.Dropdown([1, 2, 3, 4, 5], type="value", label="Որոնման Շողեր | Number of Beams", value=4, info="Աւելի բարձր թիւը ընդհանրապէս կը պատճառէ աւելի բարձր որակի, բայց նոյնիսկ երկարատեւ թարգմանութեան։ | Higher beam size will result in better quality translation, but also longer translation time.")
|
127 |
|
128 |
translate_btn.click(translate_wrapper, inputs=[text, src_lang, tgt_lang, by_sentence, clean, num_beams], outputs=translated)
|
129 |
|