Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -4,12 +4,12 @@ from numpy import random
|
|
4 |
pipe = pipeline(model="fimster/whisper-small-sv-SE") # change to "your-username/the-name-you-picked"
|
5 |
images = ["katt", "melon", "hund", "banan"]
|
6 |
image = random.choice(images)
|
7 |
-
query_image = Image.open("./images/" + image + ".jpeg")
|
8 |
|
9 |
with gr.Blocks as demo:
|
10 |
with gr.row():
|
11 |
gr.Label("Vad är detta? Spela in ditt svar med inspelningsknappen!")
|
12 |
-
input_img = gr.Image(
|
13 |
def transcribe(audio):
|
14 |
text = pipe(audio)["text"]
|
15 |
returntext = ""
|
|
|
4 |
pipe = pipeline(model="fimster/whisper-small-sv-SE") # change to "your-username/the-name-you-picked"
|
5 |
images = ["katt", "melon", "hund", "banan"]
|
6 |
image = random.choice(images)
|
7 |
+
# query_image = Image.open("./images/" + image + ".jpeg")
|
8 |
|
9 |
with gr.Blocks as demo:
|
10 |
with gr.row():
|
11 |
gr.Label("Vad är detta? Spela in ditt svar med inspelningsknappen!")
|
12 |
+
input_img = gr.Image("./images/" + image + ".jpeg")
|
13 |
def transcribe(audio):
|
14 |
text = pipe(audio)["text"]
|
15 |
returntext = ""
|