Spaces:
Sleeping
Sleeping
Added progress bar
Browse files
app.py
CHANGED
|
@@ -1,5 +1,3 @@
|
|
| 1 |
-
|
| 2 |
-
|
| 3 |
import gradio as gr
|
| 4 |
import os
|
| 5 |
import csv
|
|
@@ -272,6 +270,7 @@ def make_ui():
|
|
| 272 |
title_md = gr.Markdown("# Evaluation UI")
|
| 273 |
header_md = gr.Markdown("")
|
| 274 |
progress_md = gr.Markdown("Sample 1 of X")
|
|
|
|
| 275 |
|
| 276 |
with gr.Row():
|
| 277 |
with gr.Column(scale=1, variant='panel'):
|
|
@@ -292,7 +291,7 @@ def make_ui():
|
|
| 292 |
|
| 293 |
# --- UI ELEMENT LISTS ---
|
| 294 |
main_ui_elements = [
|
| 295 |
-
title_md, header_md, progress_md, sample_name_md, evaluation_audio,
|
| 296 |
slider_explanation_md, comment, submit_btn, status, *sliders
|
| 297 |
]
|
| 298 |
|
|
@@ -319,7 +318,8 @@ def make_ui():
|
|
| 319 |
slider_explanation_md: gr.update(value="_Move a slider to see the description for each score._", visible=True),
|
| 320 |
comment: gr.update(value="", visible=True),
|
| 321 |
submit_btn: gr.update(value="Play audio to enable", interactive=False, visible=True),
|
| 322 |
-
status: gr.update(value="Ready.", visible=True)
|
|
|
|
| 323 |
}
|
| 324 |
num_criteria = len(config['criteria'])
|
| 325 |
for i in range(MAX_CRITERIA):
|
|
|
|
|
|
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
import os
|
| 3 |
import csv
|
|
|
|
| 270 |
title_md = gr.Markdown("# Evaluation UI")
|
| 271 |
header_md = gr.Markdown("")
|
| 272 |
progress_md = gr.Markdown("Sample 1 of X")
|
| 273 |
+
progress_bar = gr.Progress(track_tqdm=False)
|
| 274 |
|
| 275 |
with gr.Row():
|
| 276 |
with gr.Column(scale=1, variant='panel'):
|
|
|
|
| 291 |
|
| 292 |
# --- UI ELEMENT LISTS ---
|
| 293 |
main_ui_elements = [
|
| 294 |
+
title_md, header_md, progress_md, progress_bar, sample_name_md, evaluation_audio,
|
| 295 |
slider_explanation_md, comment, submit_btn, status, *sliders
|
| 296 |
]
|
| 297 |
|
|
|
|
| 318 |
slider_explanation_md: gr.update(value="_Move a slider to see the description for each score._", visible=True),
|
| 319 |
comment: gr.update(value="", visible=True),
|
| 320 |
submit_btn: gr.update(value="Play audio to enable", interactive=False, visible=True),
|
| 321 |
+
status: gr.update(value="Ready.", visible=True),
|
| 322 |
+
progress_bar: gr.update(value=(index + 1) / total_samples, visible=True)
|
| 323 |
}
|
| 324 |
num_criteria = len(config['criteria'])
|
| 325 |
for i in range(MAX_CRITERIA):
|