Spaces:
Sleeping
Sleeping
fix gradio columns issue
Browse files
app.py
CHANGED
@@ -260,14 +260,15 @@ def main():
|
|
260 |
with gr.Blocks() as demo:
|
261 |
gr.Markdown("# ASR Metrics Analysis")
|
262 |
|
263 |
-
with
|
|
|
|
|
264 |
with gr.Column():
|
265 |
gr.Markdown("### Instructions")
|
266 |
gr.Markdown("* Upload your reference and hypothesis files")
|
267 |
gr.Markdown("* The interface will automatically analyze and display metrics")
|
268 |
gr.Markdown("* Results include overall metrics, sentence-level metrics, and misaligned sentences")
|
269 |
|
270 |
-
with gr.Column():
|
271 |
with gr.Row():
|
272 |
reference_file = gr.File(label="Upload Reference File")
|
273 |
hypothesis_file = gr.File(label="Upload Model Output File")
|
@@ -282,21 +283,20 @@ def main():
|
|
282 |
metrics_output = gr.Markdown(label="Metrics")
|
283 |
misaligned_output = gr.Markdown(label="Misaligned Sentences")
|
284 |
|
285 |
-
|
286 |
-
gr.Markdown("### Results")
|
287 |
-
|
288 |
-
with gr.Columns() as results_cols:
|
289 |
with gr.Column():
|
290 |
-
gr.Markdown("
|
291 |
-
gr.
|
|
|
|
|
292 |
|
293 |
-
|
294 |
-
|
295 |
-
|
296 |
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
|
301 |
# Update previews when files are uploaded
|
302 |
def update_previews(ref_file, hyp_file):
|
|
|
260 |
with gr.Blocks() as demo:
|
261 |
gr.Markdown("# ASR Metrics Analysis")
|
262 |
|
263 |
+
# Create a row with two columns
|
264 |
+
with gr.Row() as row:
|
265 |
+
# Left column for instructions and file uploads
|
266 |
with gr.Column():
|
267 |
gr.Markdown("### Instructions")
|
268 |
gr.Markdown("* Upload your reference and hypothesis files")
|
269 |
gr.Markdown("* The interface will automatically analyze and display metrics")
|
270 |
gr.Markdown("* Results include overall metrics, sentence-level metrics, and misaligned sentences")
|
271 |
|
|
|
272 |
with gr.Row():
|
273 |
reference_file = gr.File(label="Upload Reference File")
|
274 |
hypothesis_file = gr.File(label="Upload Model Output File")
|
|
|
283 |
metrics_output = gr.Markdown(label="Metrics")
|
284 |
misaligned_output = gr.Markdown(label="Misaligned Sentences")
|
285 |
|
286 |
+
# Right column for results
|
|
|
|
|
|
|
287 |
with gr.Column():
|
288 |
+
gr.Markdown("### Results")
|
289 |
+
with gr.Row():
|
290 |
+
gr.Markdown("#### Overall Metrics")
|
291 |
+
gr.JSON(label="Results", source="results_output")
|
292 |
|
293 |
+
with gr.Row():
|
294 |
+
gr.Markdown("#### Sentence-level Metrics")
|
295 |
+
gr.Markdown(label="Metrics", source="metrics_output")
|
296 |
|
297 |
+
with gr.Row():
|
298 |
+
gr.Markdown("#### Misaligned Sentences")
|
299 |
+
gr.Markdown(label="Misaligned Sentences", source="misaligned_output")
|
300 |
|
301 |
# Update previews when files are uploaded
|
302 |
def update_previews(ref_file, hyp_file):
|