zionia commited on
Commit
182b338
1 Parent(s): bd89085

add dsfsi info

Browse files
Files changed (1) hide show
  1. app.py +47 -0
app.py CHANGED
@@ -21,6 +21,27 @@ categories = {
21
  "society": "Setšhaba"
22
  }
23
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
24
  def prediction(news):
25
  classifier = pipeline("text-classification", tokenizer=tokenizer, model=model, return_all_scores=True)
26
  preds = classifier(news)
@@ -66,6 +87,32 @@ gradio_file_ui = gr.Interface(
66
  theme="default"
67
  )
68
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
69
  gradio_combined_ui = gr.TabbedInterface([gradio_ui, gradio_file_ui], ["Text Input", "File Upload"])
70
 
71
  gradio_combined_ui.launch()
 
21
  "society": "Setšhaba"
22
  }
23
 
24
+ with gr.Row():
25
+ gr.Column()
26
+ gr.Column(gr.Image("logo_transparent_small.png", alt="DSFSI Logo", elem_id="logo", label=None))
27
+ gr.Column()
28
+
29
+ description = """
30
+ <p style='text-align: center;'>
31
+ Setswana News Classification
32
+ </p>
33
+ <p>
34
+ This space provides a classification service for news in Setswana.
35
+ </p>
36
+ """
37
+
38
+ article = """
39
+ <div style='text-align: center;'>
40
+ <a href='https://github.com/dsfsi/PuoBERTa-News' target='_blank'>GitHub</a> |
41
+ <a href='https://docs.google.com/forms/d/e/1FAIpQLSf7S36dyAUPx2egmXbFpnTBuzoRulhL5Elu-N1eoMhaO7v10w/viewform' target='_blank'>Feedback Form</a>
42
+ </div>
43
+ """
44
+
45
  def prediction(news):
46
  classifier = pipeline("text-classification", tokenizer=tokenizer, model=model, return_all_scores=True)
47
  preds = classifier(news)
 
87
  theme="default"
88
  )
89
 
90
+ authors = """
91
+ <div style='text-align: center;'>
92
+ Authors: Vukosi Marivate and Moseli Mots'Oehli and Valencia Wagner and Richard Lastrucci and Isheanesu Dzingirai
93
+ </div>
94
+ """
95
+
96
+ citation = """
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
+ """
109
+
110
+ doi = """
111
+ <div style='text-align: center;'>
112
+ 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>
113
+ </div>
114
+ """
115
+
116
  gradio_combined_ui = gr.TabbedInterface([gradio_ui, gradio_file_ui], ["Text Input", "File Upload"])
117
 
118
  gradio_combined_ui.launch()