Spaces:
Sleeping
Sleeping
improve formatting
Browse files
app.py
CHANGED
@@ -16,8 +16,8 @@ def translate(inp):
|
|
16 |
|
17 |
with gr.Blocks() as demo:
|
18 |
gr.Markdown("""
|
19 |
-
<div style='text-align: center;'>
|
20 |
-
<img src='file/logo_transparent_small.png' alt='Logo' width='150'/>
|
21 |
</div>
|
22 |
""")
|
23 |
|
@@ -26,10 +26,11 @@ with gr.Blocks() as demo:
|
|
26 |
<p style='text-align: center;'>This space provides a translation service from Northern Sotho to English using the M2M100 model, fine-tuned for low-resource languages. It supports researchers, linguists, and users working with Northern Sotho texts.</p>
|
27 |
""")
|
28 |
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
|
|
33 |
|
34 |
gr.Markdown("""
|
35 |
<div style='text-align: center;'>
|
@@ -42,17 +43,19 @@ with gr.Blocks() as demo:
|
|
42 |
|
43 |
with gr.Accordion("More Information", open=False):
|
44 |
gr.Markdown("""
|
45 |
-
<h4 style="text-align: center;">
|
46 |
-
<p>This is a variant of the M2M100 model, fine-tuned on a multilingual dataset to support translation from Northern Sotho (Sepedi) to English. The model was trained with a focus on improving translation accuracy for low-resource languages.</p>
|
47 |
""")
|
48 |
gr.Markdown("""
|
|
|
49 |
<div style='text-align: center;'>
|
50 |
-
|
51 |
Isheanesu Joseph Dzingirai, Jenalea Rajab
|
52 |
</div>
|
53 |
""")
|
54 |
gr.Markdown("""
|
55 |
-
<
|
|
|
56 |
@inproceedings{lastrucci-etal-2023-preparing,
|
57 |
title = "Preparing the Vuk{'}uzenzele and {ZA}-gov-multilingual {S}outh {A}frican multilingual corpora",
|
58 |
author = "Richard Lastrucci and Isheanesu Dzingirai and Jenalea Rajab
|
@@ -68,8 +71,9 @@ with gr.Blocks() as demo:
|
|
68 |
</pre>
|
69 |
""")
|
70 |
gr.Markdown("""
|
|
|
71 |
<div style='text-align: center;'>
|
72 |
-
|
73 |
</div>
|
74 |
""")
|
75 |
|
|
|
16 |
|
17 |
with gr.Blocks() as demo:
|
18 |
gr.Markdown("""
|
19 |
+
<div style='text-align: center; margin-bottom: 20px;'>
|
20 |
+
<img src='file/logo_transparent_small.png' alt='Logo' width='150' style='display: block; margin: 0 auto;'/>
|
21 |
</div>
|
22 |
""")
|
23 |
|
|
|
26 |
<p style='text-align: center;'>This space provides a translation service from Northern Sotho to English using the M2M100 model, fine-tuned for low-resource languages. It supports researchers, linguists, and users working with Northern Sotho texts.</p>
|
27 |
""")
|
28 |
|
29 |
+
with gr.Column(variant="panel"):
|
30 |
+
inp_text = gr.Textbox(lines=5, placeholder="Enter Northern Sotho text (maximum 5 lines)", label="Input", elem_id="centered-input")
|
31 |
+
output_text = gr.Textbox(label="Output", elem_id="centered-output")
|
32 |
+
translate_button = gr.Button("Translate", elem_id="centered-button")
|
33 |
+
translate_button.click(translate, inputs=inp_text, outputs=output_text)
|
34 |
|
35 |
gr.Markdown("""
|
36 |
<div style='text-align: center;'>
|
|
|
43 |
|
44 |
with gr.Accordion("More Information", open=False):
|
45 |
gr.Markdown("""
|
46 |
+
<h4 style="text-align: center;">Model Description</h4>
|
47 |
+
<p style='text-align: center;'>This is a variant of the M2M100 model, fine-tuned on a multilingual dataset to support translation from Northern Sotho (Sepedi) to English. The model was trained with a focus on improving translation accuracy for low-resource languages.</p>
|
48 |
""")
|
49 |
gr.Markdown("""
|
50 |
+
<h4 style="text-align: center;">Authors</h4>
|
51 |
<div style='text-align: center;'>
|
52 |
+
Vukosi Marivate, Matimba Shingange, Richard Lastrucci,
|
53 |
Isheanesu Joseph Dzingirai, Jenalea Rajab
|
54 |
</div>
|
55 |
""")
|
56 |
gr.Markdown("""
|
57 |
+
<h4 style="text-align: center;">Citation</h4>
|
58 |
+
<pre style="text-align: center; white-space: pre-wrap;">
|
59 |
@inproceedings{lastrucci-etal-2023-preparing,
|
60 |
title = "Preparing the Vuk{'}uzenzele and {ZA}-gov-multilingual {S}outh {A}frican multilingual corpora",
|
61 |
author = "Richard Lastrucci and Isheanesu Dzingirai and Jenalea Rajab
|
|
|
71 |
</pre>
|
72 |
""")
|
73 |
gr.Markdown("""
|
74 |
+
<h4 style="text-align: center;">DOI</h4>
|
75 |
<div style='text-align: center;'>
|
76 |
+
<a href="https://doi.org/10.48550/arXiv.2303.03750" target="_blank">10.48550/arXiv.2303.03750</a>
|
77 |
</div>
|
78 |
""")
|
79 |
|