Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -68,7 +68,7 @@ def predict(transType, language, audio, audio_mic = None):
|
|
68 |
print("debug1:", audio,"debug2", audio_mic)
|
69 |
if not audio and audio_mic:
|
70 |
audio = audio_mic
|
71 |
-
|
72 |
if transType == "Text":
|
73 |
return translate(audio), None
|
74 |
if transType == "Audio":
|
@@ -93,8 +93,8 @@ demo = gr.Interface(
|
|
93 |
inputs=[
|
94 |
gr.Radio(label="Choose your output format", choices=transTypes),
|
95 |
gr.Radio(label="Choose a source language", choices=supportLangs, value="Swedish"),
|
96 |
-
gr.Audio(label="Import an audio", sources="upload", type="
|
97 |
-
gr.Audio(label="Record an audio", sources="microphone", type="
|
98 |
],
|
99 |
outputs=[
|
100 |
gr.Text(label="Text translation"),gr.Audio(label="Audio translation",type = "numpy")
|
|
|
68 |
print("debug1:", audio,"debug2", audio_mic)
|
69 |
if not audio and audio_mic:
|
70 |
audio = audio_mic
|
71 |
+
|
72 |
if transType == "Text":
|
73 |
return translate(audio), None
|
74 |
if transType == "Audio":
|
|
|
93 |
inputs=[
|
94 |
gr.Radio(label="Choose your output format", choices=transTypes),
|
95 |
gr.Radio(label="Choose a source language", choices=supportLangs, value="Swedish"),
|
96 |
+
gr.Audio(label="Import an audio", sources="upload", type="filepath"),
|
97 |
+
gr.Audio(label="Record an audio", sources="microphone", type="filepath"),
|
98 |
],
|
99 |
outputs=[
|
100 |
gr.Text(label="Text translation"),gr.Audio(label="Audio translation",type = "numpy")
|