Spaces:
Build error
Build error
Abubakar Abid
commited on
Commit
·
f080e4c
1
Parent(s):
ad145b5
Update app.py
Browse files
app.py
CHANGED
@@ -24,7 +24,7 @@ def process_audio_file(file):
|
|
24 |
input_values = input_values.to(torch.float16)
|
25 |
return input_values
|
26 |
|
27 |
-
def transcribe(file_mic,
|
28 |
|
29 |
target_code = target_language.split("(")[-1].split(")")[0]
|
30 |
forced_bos_token_id = MAPPING[target_code]
|
@@ -88,8 +88,7 @@ MAPPING = {
|
|
88 |
iface = gr.Interface(
|
89 |
fn=transcribe,
|
90 |
inputs=[
|
91 |
-
gr.inputs.Audio(source="microphone", type='filepath'
|
92 |
-
gr.inputs.Audio(source="upload", type='filepath', optional=True),
|
93 |
gr.inputs.Dropdown(target_language),
|
94 |
],
|
95 |
outputs="text",
|
|
|
24 |
input_values = input_values.to(torch.float16)
|
25 |
return input_values
|
26 |
|
27 |
+
def transcribe(file_mic, target_language):
|
28 |
|
29 |
target_code = target_language.split("(")[-1].split(")")[0]
|
30 |
forced_bos_token_id = MAPPING[target_code]
|
|
|
88 |
iface = gr.Interface(
|
89 |
fn=transcribe,
|
90 |
inputs=[
|
91 |
+
gr.inputs.Audio(source="microphone", type='filepath'),
|
|
|
92 |
gr.inputs.Dropdown(target_language),
|
93 |
],
|
94 |
outputs="text",
|