Abdurahman commited on
Commit
b8881c6
·
1 Parent(s): fe67771
Files changed (2) hide show
  1. app.py +4 -2
  2. util.py +3 -1
app.py CHANGED
@@ -76,8 +76,10 @@ with gr.Blocks() as app:
76
  )
77
  with gr.Row():
78
  match_box = gr.Markdown(
79
- label="Pronunciation Feedback",
80
- value="Matching and mismatched characters visualized here..."
 
 
81
  )
82
 
83
  # Bind functions to buttons
 
76
  )
77
  with gr.Row():
78
  match_box = gr.Markdown(
79
+ """Pronunciation Feedback
80
+
81
+ Matching and mismatched characters will be visualized here...
82
+ """
83
  )
84
 
85
  # Bind functions to buttons
util.py CHANGED
@@ -97,7 +97,9 @@ def calculate_pronunciation_accuracy(reference_text, output_text, script):
97
  pronunciation_accuracy = match_ratio * 100
98
 
99
  # Generate Markdown-compatible styled text
100
- comparison_md = ""
 
 
101
  for opcode, i1, i2, j1, j2 in matcher.get_opcodes():
102
  ref_segment = reference_text_clean[i1:i2]
103
  out_segment = output_text_clean[j1:j2]
 
97
  pronunciation_accuracy = match_ratio * 100
98
 
99
  # Generate Markdown-compatible styled text
100
+ comparison_md = """Pronunciation Feedback
101
+
102
+ """
103
  for opcode, i1, i2, j1, j2 in matcher.get_opcodes():
104
  ref_segment = reference_text_clean[i1:i2]
105
  out_segment = output_text_clean[j1:j2]