Irpan
commited on
Commit
·
471da93
1
Parent(s):
431665f
app
Browse files
util.py
CHANGED
@@ -97,21 +97,7 @@ def calculate_pronunciation_accuracy(reference_text, output_text, language_code=
|
|
97 |
elif opcode in ['replace', 'delete', 'insert']: # Mismatched or missing
|
98 |
comparison_md += f'<span style="color: red;">{ref_segment}</span>'
|
99 |
|
100 |
-
comparison_md = f""
|
101 |
-
<div style="
|
102 |
-
border: 1px solid #ccc;
|
103 |
-
border-radius: 4px;
|
104 |
-
padding: 10px;
|
105 |
-
margin: 5px 0;
|
106 |
-
background-color: #f9f9f9;
|
107 |
-
font-family: Arial, sans-serif;
|
108 |
-
overflow-y: auto;
|
109 |
-
max-height: 150px;
|
110 |
-
">
|
111 |
-
{comparison_md}
|
112 |
-
</div>
|
113 |
-
"""
|
114 |
-
|
115 |
|
116 |
return reference_ipa, output_ipa, comparison_md, pronunciation_accuracy
|
117 |
|
|
|
97 |
elif opcode in ['replace', 'delete', 'insert']: # Mismatched or missing
|
98 |
comparison_md += f'<span style="color: red;">{ref_segment}</span>'
|
99 |
|
100 |
+
comparison_md = f"<div>{comparison_md}</div>"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
101 |
|
102 |
return reference_ipa, output_ipa, comparison_md, pronunciation_accuracy
|
103 |
|