Spaces:
Sleeping
Sleeping
update formatting
Browse files
app.py
CHANGED
@@ -48,16 +48,17 @@ def file_prediction(file):
|
|
48 |
return results
|
49 |
|
50 |
with gr.Blocks() as demo:
|
51 |
-
gr.
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
|
|
61 |
|
62 |
with gr.Tabs():
|
63 |
with gr.Tab("Text Input"):
|
@@ -79,39 +80,43 @@ with gr.Blocks() as demo:
|
|
79 |
file_button = gr.Button("Classify File")
|
80 |
file_button.click(file_prediction, inputs=file_input, outputs=file_output)
|
81 |
|
82 |
-
gr.
|
83 |
-
|
84 |
-
<
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
|
|
|
|
|
|
|
|
116 |
|
117 |
demo.launch()
|
|
|
48 |
return results
|
49 |
|
50 |
with gr.Blocks() as demo:
|
51 |
+
with gr.Row():
|
52 |
+
with gr.Column(scale=1):
|
53 |
+
pass
|
54 |
+
with gr.Column(scale=4, min_width=1000):
|
55 |
+
gr.Image("logo_transparent_small.png", elem_id="logo", show_label=False, width=500)
|
56 |
+
gr.Markdown("""
|
57 |
+
<h1 style='text-align: center;'>Setswana News Classification</h1>
|
58 |
+
<p style='text-align: center;'>This space provides a classification service for news in Setswana.</p>
|
59 |
+
""")
|
60 |
+
with gr.Column(scale=1):
|
61 |
+
pass
|
62 |
|
63 |
with gr.Tabs():
|
64 |
with gr.Tab("Text Input"):
|
|
|
80 |
file_button = gr.Button("Classify File")
|
81 |
file_button.click(file_prediction, inputs=file_input, outputs=file_output)
|
82 |
|
83 |
+
with gr.Accordion("More Information", open=False):
|
84 |
+
gr.Markdown("""
|
85 |
+
<div style='text-align: center;'>
|
86 |
+
<a href='https://github.com/dsfsi/PuoBERTa-News' target='_blank'>GitHub</a> |
|
87 |
+
<a href='https://docs.google.com/forms/d/e/1FAIpQLSf7S36dyAUPx2egmXbFpnTBuzoRulhL5Elu-N1eoMhaO7v10w/viewform' target='_blank'>Feedback Form</a>
|
88 |
+
</div>
|
89 |
+
""")
|
90 |
+
|
91 |
+
gr.Markdown("""
|
92 |
+
<h4 style="text-align: center;">Authors</h4>
|
93 |
+
<div style='text-align: center;'>
|
94 |
+
Vukosi Marivate, Moseli Mots'Oehli, Valencia Wagner, Richard Lastrucci, Isheanesu Dzingirai
|
95 |
+
</div>
|
96 |
+
""")
|
97 |
+
|
98 |
+
gr.Markdown("""
|
99 |
+
<h4 style="text-align: center;">Citation</h4>
|
100 |
+
<pre style="text-align: left; white-space: pre-wrap;">
|
101 |
+
@inproceedings{marivate2023puoberta,
|
102 |
+
title = {PuoBERTa: Training and evaluation of a curated language model for Setswana},
|
103 |
+
author = {Vukosi Marivate and Moseli Mots'Oehli and Valencia Wagner and Richard Lastrucci and Isheanesu Dzingirai},
|
104 |
+
year = {2023},
|
105 |
+
booktitle= {Artificial Intelligence Research. SACAIR 2023. Communications in Computer and Information Science},
|
106 |
+
url= {https://link.springer.com/chapter/10.1007/978-3-031-49002-6_17},
|
107 |
+
keywords = {NLP},
|
108 |
+
preprint_url = {https://arxiv.org/abs/2310.09141},
|
109 |
+
dataset_url = {https://github.com/dsfsi/PuoBERTa},
|
110 |
+
software_url = {https://huggingface.co/dsfsi/PuoBERTa}
|
111 |
+
}
|
112 |
+
</pre>
|
113 |
+
""")
|
114 |
+
|
115 |
+
gr.Markdown("""
|
116 |
+
<h4 style="text-align: center;">DOI</h4>
|
117 |
+
<div style='text-align: center;'>
|
118 |
+
DOI: <a href="https://doi.org/10.1007/978-3-031-49002-6_17" target="_blank">10.1007/978-3-031-49002-6_17</a>
|
119 |
+
</div>
|
120 |
+
""")
|
121 |
|
122 |
demo.launch()
|