Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -7,10 +7,7 @@ import os
|
|
7 |
import huggingface_hub
|
8 |
from transformers import pipeline
|
9 |
|
10 |
-
# with open('ISO_codes.json', 'r') as file:
|
11 |
-
# iso_codes = json.load(file)
|
12 |
|
13 |
-
# languages = ["lug", "ach", "nyn", "teo"]
|
14 |
auth_token = os.environ.get("HF_TOKEN")
|
15 |
|
16 |
|
@@ -47,11 +44,11 @@ description = '''ASR with salt-mms'''
|
|
47 |
|
48 |
iface = gr.Interface(fn=transcribe_audio,
|
49 |
inputs=[
|
50 |
-
gr.Audio(source="microphone", type="filepath", label="Record Audio"),
|
51 |
-
gr.Audio(source="upload", type="filepath", label="Upload Audio"),
|
52 |
gr.Dropdown(choices=languages, label="Language", value="English")
|
53 |
],
|
54 |
outputs=gr.Textbox(label="Transcription"),
|
55 |
description=description
|
56 |
)
|
|
|
57 |
iface.launch()
|
|
|
7 |
import huggingface_hub
|
8 |
from transformers import pipeline
|
9 |
|
|
|
|
|
10 |
|
|
|
11 |
auth_token = os.environ.get("HF_TOKEN")
|
12 |
|
13 |
|
|
|
44 |
|
45 |
iface = gr.Interface(fn=transcribe_audio,
|
46 |
inputs=[
|
47 |
+
gr.Audio(source="microphone, upload", type="filepath", label="Record or Upload Audio"),
|
|
|
48 |
gr.Dropdown(choices=languages, label="Language", value="English")
|
49 |
],
|
50 |
outputs=gr.Textbox(label="Transcription"),
|
51 |
description=description
|
52 |
)
|
53 |
+
|
54 |
iface.launch()
|