Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -8,6 +8,9 @@ image = random.choice(images)
|
|
8 |
|
9 |
def transcribe(audio, img):
|
10 |
text = pipe(audio)["text"]
|
|
|
|
|
|
|
11 |
returntext = ""
|
12 |
if text.lower() != image.lower():
|
13 |
returntext = "Du svarade fel, ditt svar var: " + text + ", rätt svar var: " + image
|
|
|
8 |
|
9 |
def transcribe(audio, img):
|
10 |
text = pipe(audio)["text"]
|
11 |
+
text = text.replace("!", "")
|
12 |
+
text = text.replace(".", "")
|
13 |
+
text = text.replace(",", "")
|
14 |
returntext = ""
|
15 |
if text.lower() != image.lower():
|
16 |
returntext = "Du svarade fel, ditt svar var: " + text + ", rätt svar var: " + image
|