zionia commited on
Commit
fb48df9
·
verified ·
1 Parent(s): 95c607e

update formatting

Browse files
Files changed (1) hide show
  1. app.py +49 -44
app.py CHANGED
@@ -48,16 +48,17 @@ def file_prediction(file):
48
  return results
49
 
50
  with gr.Blocks() as demo:
51
- gr.Markdown("""
52
- <div style='text-align: center;'>
53
- <img src='file/logo_transparent_small.png' alt='Logo' width='150'/>
54
- </div>
55
- """)
56
-
57
- gr.Markdown("""
58
- <h1 style='text-align: center;'>Setswana News Classification</h1>
59
- <p style='text-align: center;'>This space provides a classification service for news in Setswana.</p>
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.Markdown("""
83
- <div style='text-align: center;'>
84
- <a href='https://github.com/dsfsi/PuoBERTa-News' target='_blank'>GitHub</a> |
85
- <a href='https://docs.google.com/forms/d/e/1FAIpQLSf7S36dyAUPx2egmXbFpnTBuzoRulhL5Elu-N1eoMhaO7v10w/viewform' target='_blank'>Feedback Form</a>
86
- </div>
87
- """)
88
-
89
- gr.Markdown("""
90
- <div style='text-align: center;'>
91
- Authors: Vukosi Marivate and Moseli Mots'Oehli and Valencia Wagner and Richard Lastrucci and Isheanesu Dzingirai
92
- </div>
93
- """)
94
-
95
- gr.Markdown("""
96
- <pre style="text-align: left; white-space: pre-wrap;">
97
- @inproceedings{marivate2023puoberta,
98
- title = {PuoBERTa: Training and evaluation of a curated language model for Setswana},
99
- author = {Vukosi Marivate and Moseli Mots'Oehli and Valencia Wagner and Richard Lastrucci and Isheanesu Dzingirai},
100
- year = {2023},
101
- booktitle= {Artificial Intelligence Research. SACAIR 2023. Communications in Computer and Information Science},
102
- url= {https://link.springer.com/chapter/10.1007/978-3-031-49002-6_17},
103
- keywords = {NLP},
104
- preprint_url = {https://arxiv.org/abs/2310.09141},
105
- dataset_url = {https://github.com/dsfsi/PuoBERTa},
106
- software_url = {https://huggingface.co/dsfsi/PuoBERTa}
107
- }
108
- </pre>
109
- """)
110
-
111
- gr.Markdown("""
112
- <div style='text-align: center;'>
113
- 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>
114
- </div>
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()