Spaces:
Build error
Build error
File size: 2,440 Bytes
050a5d4 0283663 050a5d4 0283663 050a5d4 0283663 050a5d4 0283663 050a5d4 0283663 050a5d4 0283663 050a5d4 0283663 050a5d4 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 |
from turtle import width
import gradio as gr
from utils import SampleClass
sample = SampleClass()
# --- Interface ---
demo = gr.Blocks(
title="Categories_error_analysis.ipynb",
css=".container { max-width: 98%; margin: auto;};")
with demo:
gr.Markdown("<h2><center> π± Categories Error Analysis π</center></h2>")
with gr.Row():
with gr.Column():
with gr.Row():
with gr.Column():
with gr.Row():category = gr.Dropdown(
label="Category",
value="relational",
choices=["intrinsic","spatial","ordinal","relational","plural"])
with gr.Column():
with gr.Row():predictions = gr.Dropdown(
label='Predictions',
value='fail',
choices=["fail", "correct"])
with gr.Row():
with gr.Column():
with gr.Row():model = gr.Dropdown(
label='Model',
value='baseline',
choices=["baseline", "extended"])
with gr.Column():
with gr.Row():split = gr.Dropdown(
label='Split',
value='val',
choices=["test","val"])
with gr.Row():
with gr.Column():
with gr.Row():username = gr.Dropdown(
label="UserName",
value="luciana",
choices=["luciana",'mauri','jorge','nano'])
with gr.Column():
with gr.Row():next_idx_sample = gr.Number(
label='Next Idx Sample',
value=0)
with gr.Row():
progress = gr.Label(label='Progress',num_top_classes=10)
with gr.Row():
btn_next = gr.Button("Get Next Sample")
with gr.Column():
with gr.Row(): info = gr.Text(label="Sample Info")
with gr.Row(): img = gr.Image(label="Sample", type="numpy")
btn_next.click(
fn=sample.explorateSamples,
inputs=[username,predictions,category,model,split,next_idx_sample],
outputs=[next_idx_sample, progress, img, info])
# demo.queue(concurrency_count=10)
demo.launch(debug=False) |