Spaces:
Runtime error
Runtime error
gorkaartola
commited on
Commit
•
cb3be1a
1
Parent(s):
ec0be50
Upload app.py
Browse files
app.py
ADDED
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
'''
|
2 |
+
model_selector = '0'
|
3 |
+
queries_selector = '0'
|
4 |
+
prompt_selector = '0'
|
5 |
+
metric_selector = '0'
|
6 |
+
prediction_strategy_selector = ['1','2.0','2.1','2.2','2.3','3.0','3.1','3.2','3.3']
|
7 |
+
'''
|
8 |
+
|
9 |
+
import gradio as gr
|
10 |
+
import run_offline
|
11 |
+
import options as op
|
12 |
+
|
13 |
+
#from evaluate.utils.logging import get_logger
|
14 |
+
#logger = get_logger(__name__)
|
15 |
+
|
16 |
+
iface = gr.Interface(
|
17 |
+
run_offline.tp_tf_test,
|
18 |
+
[
|
19 |
+
gr.Radio(list(op.models.keys())),
|
20 |
+
gr.Radio(list(op.queries.keys())),
|
21 |
+
gr.Radio(list(op.prompts.keys())),
|
22 |
+
gr.Radio(list(op.metrics.keys())),
|
23 |
+
gr.CheckboxGroup(list(op.prediction_strategy_options.keys())),
|
24 |
+
],
|
25 |
+
"text",
|
26 |
+
title="Classification by SDGs",
|
27 |
+
description="Zero Shot Classification by SDG over test dataset",
|
28 |
+
)
|
29 |
+
|
30 |
+
iface.launch()
|