akki2825 commited on
Commit
16edca7
·
verified ·
1 Parent(s): 11f8395

fix json source issue

Browse files
Files changed (1) hide show
  1. app.py +4 -7
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", visible=False)
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):
 
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):