Spaces:
Sleeping
Sleeping
Commit
•
7cdd792
1
Parent(s):
0942332
Polish layout and description
Browse files
app.py
CHANGED
@@ -197,7 +197,7 @@ with gr.Blocks(theme=theme) as iface:
|
|
197 |
with gr.Column():
|
198 |
model_id_input = gr.Textbox(
|
199 |
label="Hugging Face model id",
|
200 |
-
placeholder="cardiffnlp/twitter-roberta-base-sentiment-latest",
|
201 |
)
|
202 |
|
203 |
# TODO: Add supported model pairs: Text Classification - text-classification
|
@@ -209,12 +209,17 @@ with gr.Blocks(theme=theme) as iface:
|
|
209 |
],
|
210 |
value=0,
|
211 |
)
|
212 |
-
example_labels = gr.Label(label='Model
|
|
|
|
|
|
|
|
|
|
|
213 |
|
214 |
with gr.Column():
|
215 |
dataset_id_input = gr.Textbox(
|
216 |
label="Hugging Face dataset id",
|
217 |
-
placeholder="tweet_eval",
|
218 |
)
|
219 |
|
220 |
dataset_config_input = gr.Dropdown(
|
@@ -235,21 +240,18 @@ with gr.Blocks(theme=theme) as iface:
|
|
235 |
value="test",
|
236 |
)
|
237 |
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
' "label": {0: "Positive", 1: "Negative"}\n'
|
251 |
-
'}',
|
252 |
-
)
|
253 |
|
254 |
with gr.Row():
|
255 |
validate_btn = gr.Button("Validate model and dataset", variant="primary")
|
|
|
197 |
with gr.Column():
|
198 |
model_id_input = gr.Textbox(
|
199 |
label="Hugging Face model id",
|
200 |
+
placeholder="e.g.: cardiffnlp/twitter-roberta-base-sentiment-latest",
|
201 |
)
|
202 |
|
203 |
# TODO: Add supported model pairs: Text Classification - text-classification
|
|
|
209 |
],
|
210 |
value=0,
|
211 |
)
|
212 |
+
example_labels = gr.Label(label='Model prediction result', visible=False)
|
213 |
+
|
214 |
+
id2label_mapping_dataframe = gr.DataFrame(
|
215 |
+
label="Model-dataset label mapping",
|
216 |
+
visible=False,
|
217 |
+
)
|
218 |
|
219 |
with gr.Column():
|
220 |
dataset_id_input = gr.Textbox(
|
221 |
label="Hugging Face dataset id",
|
222 |
+
placeholder="e.g.: tweet_eval",
|
223 |
)
|
224 |
|
225 |
dataset_config_input = gr.Dropdown(
|
|
|
240 |
value="test",
|
241 |
)
|
242 |
|
243 |
+
with gr.Accordion("Advance", open=False):
|
244 |
+
run_local = gr.Checkbox(value=True, label="Run in this Space")
|
245 |
+
column_mapping_input = gr.Textbox(
|
246 |
+
value="",
|
247 |
+
lines=6,
|
248 |
+
label="Column mapping",
|
249 |
+
placeholder="Description of mapping of columns in model to dataset, in json format, e.g.:\n"
|
250 |
+
'{\n'
|
251 |
+
' "text": "context",\n'
|
252 |
+
' "label": {0: "Positive", 1: "Negative"}\n'
|
253 |
+
'}',
|
254 |
+
)
|
|
|
|
|
|
|
255 |
|
256 |
with gr.Row():
|
257 |
validate_btn = gr.Button("Validate model and dataset", variant="primary")
|