mr2along commited on
Commit
061b18a
1 Parent(s): 5f70330

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +0 -5
app.py CHANGED
@@ -88,11 +88,6 @@ def compare_texts(reference_text, transcribed_text):
88
  # Provide audio for incorrect words
89
  if incorrect_words_audios:
90
  html_output += "<br><strong>Pronunciation for Incorrect Words:</strong><br>"
91
- for word, audio in incorrect_words_audios:
92
- suggestion = difflib.get_close_matches(word, reference_words, n=1)
93
- suggestion_text = f" (Did you mean: <em>{suggestion[0]}</em>?)" if suggestion else ""
94
- html_output += f'{word}: '
95
- html_output += f'<audio controls><source src="{audio}" type="audio/mpeg">Your browser does not support the audio tag.</audio>{suggestion_text}<br>'
96
 
97
 
98
  return [html_output, incorrect_words_audios]
 
88
  # Provide audio for incorrect words
89
  if incorrect_words_audios:
90
  html_output += "<br><strong>Pronunciation for Incorrect Words:</strong><br>"
 
 
 
 
 
91
 
92
 
93
  return [html_output, incorrect_words_audios]