Spaces:
Sleeping
Sleeping
fix misaligned error
Browse files
app.py
CHANGED
@@ -74,7 +74,7 @@ def calculate_sentence_metrics(reference, hypothesis):
|
|
74 |
}
|
75 |
except Exception as e:
|
76 |
raise e
|
77 |
-
|
78 |
def identify_misaligned_sentences(reference_text, hypothesis_text):
|
79 |
"""
|
80 |
Identify sentences that don't match between reference and hypothesis.
|
@@ -194,7 +194,8 @@ def main():
|
|
194 |
def process_and_display(ref_file, hyp_file):
|
195 |
result = process_files(ref_file, hyp_file)
|
196 |
if "error" in result:
|
197 |
-
|
|
|
198 |
|
199 |
metrics = {
|
200 |
"Overall WER": result["Overall WER"],
|
|
|
74 |
}
|
75 |
except Exception as e:
|
76 |
raise e
|
77 |
+
|
78 |
def identify_misaligned_sentences(reference_text, hypothesis_text):
|
79 |
"""
|
80 |
Identify sentences that don't match between reference and hypothesis.
|
|
|
194 |
def process_and_display(ref_file, hyp_file):
|
195 |
result = process_files(ref_file, hyp_file)
|
196 |
if "error" in result:
|
197 |
+
error_msg = result["error"]
|
198 |
+
return {"error": error_msg}, "", "", {"error": error_msg}
|
199 |
|
200 |
metrics = {
|
201 |
"Overall WER": result["Overall WER"],
|