Spaces:
Running
Running
gabrielabueg
commited on
Commit
•
635ec15
1
Parent(s):
d2f90d8
Update app.py
Browse files
app.py
CHANGED
@@ -2,9 +2,9 @@ import gradio as gr
|
|
2 |
|
3 |
title = "Tagalog RoBERTa"
|
4 |
|
5 |
-
description = "<p style='text-align: center'>Tagalog Gradio Demo for RoBERTa. To use it, simply add your text, or click one of the examples to load them
|
6 |
|
7 |
-
article = "Improving Large-scale Language Models and Resources for Filipino,Jan Christian Blaise Cruz and Charibeth Cheng,arXiv preprint arXiv:2111.06053,2021"
|
8 |
|
9 |
examples = [
|
10 |
['Makulay ang <mask> na suot ni Roberta.','roberta-tagalog-base'],
|
@@ -12,16 +12,16 @@ examples = [
|
|
12 |
]
|
13 |
|
14 |
|
15 |
-
|
16 |
|
17 |
-
|
18 |
|
19 |
|
20 |
def inference(inputtext, model):
|
21 |
if model == "roberta-tagalog-base":
|
22 |
-
outlabel =
|
23 |
-
|
24 |
-
outlabel =
|
25 |
return outlabel
|
26 |
|
27 |
|
|
|
2 |
|
3 |
title = "Tagalog RoBERTa"
|
4 |
|
5 |
+
description = "<p style='text-align: center'>Tagalog Gradio Demo for RoBERTa. To use it, simply add your text, or click one of the examples to load them.</p>"
|
6 |
|
7 |
+
article = "<p style='text-align: center'>Improving Large-scale Language Models and Resources for Filipino,Jan Christian Blaise Cruz and Charibeth Cheng,arXiv preprint arXiv:2111.06053,2021</p>"
|
8 |
|
9 |
examples = [
|
10 |
['Makulay ang <mask> na suot ni Roberta.','roberta-tagalog-base'],
|
|
|
12 |
]
|
13 |
|
14 |
|
15 |
+
i1 = gr.Interface.load("huggingface/jcblaise/roberta-tagalog-base")
|
16 |
|
17 |
+
i2 = gr.Interface.load("huggingface/jcblaise/roberta-tagalog-large")
|
18 |
|
19 |
|
20 |
def inference(inputtext, model):
|
21 |
if model == "roberta-tagalog-base":
|
22 |
+
outlabel = i1(inputtext)
|
23 |
+
if model == "roberta-tagalog-large":
|
24 |
+
outlabel = i2(inputtext)
|
25 |
return outlabel
|
26 |
|
27 |
|