Spaces:
Sleeping
Sleeping
fix json source issue
Browse files
app.py
CHANGED
@@ -260,9 +260,7 @@ def main():
|
|
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")
|
@@ -279,24 +277,23 @@ def main():
|
|
279 |
|
280 |
with gr.Row():
|
281 |
compute_button = gr.Button("Compute Metrics", variant="primary")
|
282 |
-
results_output = gr.JSON(label="Results"
|
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
|
292 |
|
293 |
with gr.Row():
|
294 |
gr.Markdown("#### Sentence-level Metrics")
|
295 |
-
gr.Markdown(label="Metrics
|
296 |
|
297 |
with gr.Row():
|
298 |
gr.Markdown("#### Misaligned Sentences")
|
299 |
-
gr.Markdown(label="Misaligned Sentences
|
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 |
with gr.Row() as row:
|
|
|
264 |
with gr.Column():
|
265 |
gr.Markdown("### Instructions")
|
266 |
gr.Markdown("* Upload your reference and hypothesis files")
|
|
|
277 |
|
278 |
with gr.Row():
|
279 |
compute_button = gr.Button("Compute Metrics", variant="primary")
|
280 |
+
results_output = gr.JSON(label="Results")
|
281 |
metrics_output = gr.Markdown(label="Metrics")
|
282 |
misaligned_output = gr.Markdown(label="Misaligned Sentences")
|
283 |
|
|
|
284 |
with gr.Column():
|
285 |
gr.Markdown("### Results")
|
286 |
with gr.Row():
|
287 |
gr.Markdown("#### Overall Metrics")
|
288 |
+
gr.JSON(label="Results Output")
|
289 |
|
290 |
with gr.Row():
|
291 |
gr.Markdown("#### Sentence-level Metrics")
|
292 |
+
gr.Markdown(label="Sentence Metrics Output")
|
293 |
|
294 |
with gr.Row():
|
295 |
gr.Markdown("#### Misaligned Sentences")
|
296 |
+
gr.Markdown(label="Misaligned Sentences Output")
|
297 |
|
298 |
# Update previews when files are uploaded
|
299 |
def update_previews(ref_file, hyp_file):
|