antonbol commited on
Commit
732d8fb
·
1 Parent(s): f54a47c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -0
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