Spaces:
Runtime error
Runtime error
Commit
•
90f9b75
1
Parent(s):
df326b5
Upload app.py
Browse files
app.py
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import gradio as gr
|
2 |
+
import run
|
3 |
+
import options as op
|
4 |
+
|
5 |
+
#from evaluate.utils.logging import get_logger
|
6 |
+
#logger = get_logger(__name__)
|
7 |
+
|
8 |
+
iface = gr.Interface(
|
9 |
+
run.tp_tf_test,
|
10 |
+
[
|
11 |
+
gr.Radio(list(op.models.keys())),
|
12 |
+
gr.Radio(list(op.test_datasets.keys())),
|
13 |
+
gr.Radio(list(op.queries.keys())),
|
14 |
+
gr.Radio(list(op.prompts.keys())),
|
15 |
+
gr.Radio(list(op.metrics.keys())),
|
16 |
+
gr.CheckboxGroup(list(op.prediction_strategy_options.keys())),
|
17 |
+
],
|
18 |
+
gr.File(),
|
19 |
+
title="Testing Zero Shot Classification by SDGs",
|
20 |
+
description="With this app you can test different Zero Shot approaches to classify sentences by Sustainable Development Goals. Please design the configuration to be tested selecting the ZS model, the test dataset that include the sentences to be classified (sentence 1), the queries and prompts that conform the sentences describing the different SDGs to perform the classification (sentence 2), the metric, and and as much prediction strategies you would like to explore given the previous choices. The choices for each paramenter are included in the file options.py and could be extended include new alternatives in this file",
|
21 |
+
)
|
22 |
+
|
23 |
+
iface.launch()
|