Spaces:
Sleeping
Sleeping
Fixed names. working
Browse files
app.py
CHANGED
@@ -17,7 +17,6 @@ def highlight_errors(ground_truth, hypothesis):
|
|
17 |
# Process each alignment operation in measures
|
18 |
for alignment in measures['ops']:
|
19 |
for chunk in alignment:
|
20 |
-
print(chunk)
|
21 |
if chunk.type == 'equal':
|
22 |
# Add equal words without highlighting
|
23 |
highlighted_hyp.extend(gt_words[chunk.ref_start_idx:chunk.ref_end_idx])
|
@@ -72,13 +71,13 @@ interface = gr.Interface(
|
|
72 |
fn=highlight_errors,
|
73 |
inputs=["text", "text"],
|
74 |
outputs=[
|
75 |
-
gr.HTML(label="Highlighted Transcript
|
76 |
gr.Number(label="Word Error Rate"),
|
77 |
gr.Number(label="Substitutions"),
|
78 |
gr.Number(label="Insertions"),
|
79 |
gr.Number(label="Deletions")
|
80 |
],
|
81 |
-
title="WER
|
82 |
)
|
83 |
|
84 |
interface.launch()
|
|
|
17 |
# Process each alignment operation in measures
|
18 |
for alignment in measures['ops']:
|
19 |
for chunk in alignment:
|
|
|
20 |
if chunk.type == 'equal':
|
21 |
# Add equal words without highlighting
|
22 |
highlighted_hyp.extend(gt_words[chunk.ref_start_idx:chunk.ref_end_idx])
|
|
|
71 |
fn=highlight_errors,
|
72 |
inputs=["text", "text"],
|
73 |
outputs=[
|
74 |
+
gr.HTML(label="Highlighted Transcript"),
|
75 |
gr.Number(label="Word Error Rate"),
|
76 |
gr.Number(label="Substitutions"),
|
77 |
gr.Number(label="Insertions"),
|
78 |
gr.Number(label="Deletions")
|
79 |
],
|
80 |
+
title="WER Analysis"
|
81 |
)
|
82 |
|
83 |
interface.launch()
|