Abdurahman
commited on
Commit
•
6a8d513
1
Parent(s):
efdb44e
app
Browse files
app.py
CHANGED
@@ -59,12 +59,12 @@ with gr.Blocks() as app:
|
|
59 |
with gr.Group():
|
60 |
with gr.Row():
|
61 |
machine_pronunciation_box = gr.Textbox(
|
62 |
-
label="Machine
|
63 |
placeholder="IPA representation of the machine pronunciation..."
|
64 |
)
|
65 |
with gr.Row():
|
66 |
user_pronunciation_box = gr.Textbox(
|
67 |
-
label="User
|
68 |
placeholder="IPA representation of the user pronunciation..."
|
69 |
)
|
70 |
|
|
|
59 |
with gr.Group():
|
60 |
with gr.Row():
|
61 |
machine_pronunciation_box = gr.Textbox(
|
62 |
+
label="Machine Phonemes",
|
63 |
placeholder="IPA representation of the machine pronunciation..."
|
64 |
)
|
65 |
with gr.Row():
|
66 |
user_pronunciation_box = gr.Textbox(
|
67 |
+
label="User Phonemes",
|
68 |
placeholder="IPA representation of the user pronunciation..."
|
69 |
)
|
70 |
|
util.py
CHANGED
@@ -88,7 +88,7 @@ def calculate_pronunciation_accuracy(reference_text, output_text, language_code=
|
|
88 |
if opcode == 'equal': # Matching characters
|
89 |
comparison_md += f'<span style="color: blue;">{ref_segment}</span>'
|
90 |
elif opcode in ['replace', 'delete', 'insert']: # Mismatched or missing
|
91 |
-
comparison_md += f'<span style="color:
|
92 |
|
93 |
comparison_md = f"<div>{comparison_md}</div>"
|
94 |
|
|
|
88 |
if opcode == 'equal': # Matching characters
|
89 |
comparison_md += f'<span style="color: blue;">{ref_segment}</span>'
|
90 |
elif opcode in ['replace', 'delete', 'insert']: # Mismatched or missing
|
91 |
+
comparison_md += f'<span style="color: orange;">{ref_segment}</span>'
|
92 |
|
93 |
comparison_md = f"<div>{comparison_md}</div>"
|
94 |
|