DurreSudoku commited on
Commit
09dea42
·
verified ·
1 Parent(s): 37bd6be

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -64,10 +64,10 @@ def transcribe(audio):
64
  for text in text_list:
65
  match_ratio = SequenceMatcher(None, text, correct_answer).ratio()
66
 
67
- if match_ratio > 0.8:
68
- return f"Partially correct. The answer is {correct_answer}. I heard {text}."
69
  # If no match is found.
70
- return f"Incorrect. The correct answer is {correct_answer}. I heard {transcribed_audio}."
71
 
72
 
73
  with gr.Blocks(title="Interactive Language Learning") as demo:
 
64
  for text in text_list:
65
  match_ratio = SequenceMatcher(None, text, correct_answer).ratio()
66
 
67
+ if match_ratio >= 0.8:
68
+ return f"The answer is {correct_answer}. I heard {text}."
69
  # If no match is found.
70
+ return f"The correct answer is {correct_answer}. I heard {transcribed_audio}."
71
 
72
 
73
  with gr.Blocks(title="Interactive Language Learning") as demo: