Spaces:
Sleeping
Sleeping
update layout
Browse files
app.py
CHANGED
@@ -41,25 +41,19 @@ article = """
|
|
41 |
<br/>
|
42 |
"""
|
43 |
|
44 |
-
extra_info = """
|
45 |
-
<div style='text-align: center;'>
|
46 |
-
<h4>More information about the space</h4>
|
47 |
-
</div>
|
48 |
-
<p>
|
49 |
-
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.
|
50 |
-
</p>
|
51 |
-
"""
|
52 |
-
|
53 |
authors = """
|
54 |
<div style='text-align: center;'>
|
55 |
-
Authors: Vukosi Marivate, Matimba Shingange, Richard Lastrucci,
|
|
|
56 |
</div>
|
57 |
"""
|
58 |
|
59 |
citation = """
|
|
|
60 |
@inproceedings{lastrucci-etal-2023-preparing,
|
61 |
title = "Preparing the Vuk{'}uzenzele and {ZA}-gov-multilingual {S}outh {A}frican multilingual corpora",
|
62 |
-
author = "Richard Lastrucci and Isheanesu Dzingirai and Jenalea Rajab
|
|
|
63 |
booktitle = "Proceedings of the Fourth workshop on Resources for African Indigenous Languages (RAIL 2023)",
|
64 |
month = may,
|
65 |
year = "2023",
|
@@ -68,6 +62,7 @@ citation = """
|
|
68 |
url = "https://aclanthology.org/2023.rail-1.3",
|
69 |
pages = "18--25"
|
70 |
}
|
|
|
71 |
"""
|
72 |
|
73 |
doi = """
|
@@ -77,24 +72,27 @@ doi = """
|
|
77 |
"""
|
78 |
|
79 |
with gr.Blocks() as demo:
|
80 |
-
gr.Markdown(logo)
|
81 |
-
gr.Markdown(description)
|
82 |
gr.Markdown(article)
|
83 |
-
|
84 |
-
textbox = gr.Textbox(lines=5, placeholder="Enter Northern Sotho text (maximum 5 lines)", label="Input")
|
85 |
-
output_text = gr.Textbox(label="Translation")
|
86 |
-
|
87 |
gr.Interface(
|
88 |
fn=translate,
|
89 |
inputs=textbox,
|
90 |
outputs=output_text,
|
91 |
title="Northern Sotho to English Translation"
|
92 |
)
|
93 |
-
|
94 |
-
gr.
|
95 |
-
|
96 |
-
|
97 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
98 |
|
99 |
demo.launch(enable_queue=True)
|
100 |
|
|
|
41 |
<br/>
|
42 |
"""
|
43 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
44 |
authors = """
|
45 |
<div style='text-align: center;'>
|
46 |
+
Authors: Vukosi Marivate, Matimba Shingange, Richard Lastrucci,
|
47 |
+
Isheanesu Joseph Dzingirai, Jenalea Rajab
|
48 |
</div>
|
49 |
"""
|
50 |
|
51 |
citation = """
|
52 |
+
<pre style="text-align: left; white-space: pre-wrap;">
|
53 |
@inproceedings{lastrucci-etal-2023-preparing,
|
54 |
title = "Preparing the Vuk{'}uzenzele and {ZA}-gov-multilingual {S}outh {A}frican multilingual corpora",
|
55 |
+
author = "Richard Lastrucci and Isheanesu Dzingirai and Jenalea Rajab
|
56 |
+
and Andani Madodonga and Matimba Shingange and Daniel Njini and Vukosi Marivate",
|
57 |
booktitle = "Proceedings of the Fourth workshop on Resources for African Indigenous Languages (RAIL 2023)",
|
58 |
month = may,
|
59 |
year = "2023",
|
|
|
62 |
url = "https://aclanthology.org/2023.rail-1.3",
|
63 |
pages = "18--25"
|
64 |
}
|
65 |
+
</pre>
|
66 |
"""
|
67 |
|
68 |
doi = """
|
|
|
72 |
"""
|
73 |
|
74 |
with gr.Blocks() as demo:
|
75 |
+
gr.Markdown(logo)
|
76 |
+
gr.Markdown(description)
|
77 |
gr.Markdown(article)
|
78 |
+
|
|
|
|
|
|
|
79 |
gr.Interface(
|
80 |
fn=translate,
|
81 |
inputs=textbox,
|
82 |
outputs=output_text,
|
83 |
title="Northern Sotho to English Translation"
|
84 |
)
|
85 |
+
|
86 |
+
with gr.Accordion("More Information", open=False):
|
87 |
+
gr.Markdown("""
|
88 |
+
<h4 style="text-align: center;">More information about the space</h4>
|
89 |
+
<p>This is a variant of the M2M100 model, fine-tuned on a multilingual dataset
|
90 |
+
to support translation from Northern Sotho (Sepedi) to English. The model was trained
|
91 |
+
with a focus on improving translation accuracy for low-resource languages.</p>
|
92 |
+
""")
|
93 |
+
gr.Markdown(authors)
|
94 |
+
gr.Markdown(citation)
|
95 |
+
gr.Markdown(doi)
|
96 |
|
97 |
demo.launch(enable_queue=True)
|
98 |
|