Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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
|
68 |
-
return f"
|
69 |
# If no match is found.
|
70 |
-
return f"
|
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:
|