Upload app.py
Browse files
app.py
CHANGED
@@ -30,10 +30,9 @@ def tokenized_data(tokenizer, inputs):
|
|
30 |
examples = []
|
31 |
df = pd.read_csv('examples.csv', sep='\t', index_col='Unnamed: 0')
|
32 |
random.seed(100)
|
33 |
-
for i in range(
|
34 |
idx = random.randint(0, 50)
|
35 |
-
examples.
|
36 |
-
examples.append(['Kor', df.iloc[idx, 1]])
|
37 |
|
38 |
|
39 |
eng_model_name = "roberta-base"
|
@@ -87,8 +86,8 @@ def builder(lang, text):
|
|
87 |
|
88 |
|
89 |
demo = gr.Interface(builder, inputs=[gr.inputs.Dropdown(['Eng', 'Kor']), "text"],
|
90 |
-
|
91 |
-
outputs='label',
|
92 |
title=title, description=description, examples=examples)
|
93 |
|
94 |
|
|
|
30 |
examples = []
|
31 |
df = pd.read_csv('examples.csv', sep='\t', index_col='Unnamed: 0')
|
32 |
random.seed(100)
|
33 |
+
for i in range(15):
|
34 |
idx = random.randint(0, 50)
|
35 |
+
examples.extend([ ['Eng', df.iloc[idx, 0]], ['Kor', df.iloc[idx, 1]] ])
|
|
|
36 |
|
37 |
|
38 |
eng_model_name = "roberta-base"
|
|
|
86 |
|
87 |
|
88 |
demo = gr.Interface(builder, inputs=[gr.inputs.Dropdown(['Eng', 'Kor']), "text"],
|
89 |
+
outputs=gr.Label(num_top_classes=2, label='Res', color='CadetBlue'),
|
90 |
+
# outputs='label',
|
91 |
title=title, description=description, examples=examples)
|
92 |
|
93 |
|