Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -97,12 +97,12 @@ examples = [
|
|
97 |
]
|
98 |
|
99 |
# CSS
|
100 |
-
css="""
|
101 |
#col-container {
|
102 |
margin: 0 auto;
|
103 |
max-width: 520px;
|
104 |
}
|
105 |
-
"""
|
106 |
|
107 |
demo = gr.Blocks()
|
108 |
|
@@ -118,7 +118,7 @@ mic_translate = gr.Interface(
|
|
118 |
# File translation using uploaded files as input
|
119 |
audio_translate = gr.Interface(
|
120 |
fn=speech_to_speech_translation,
|
121 |
-
inputs=
|
122 |
outputs=gr.Audio(label="Generated Speech", type="numpy"),
|
123 |
examples=[["./english.wav"], ["./chinese.wav"]],
|
124 |
title=title,
|
@@ -296,6 +296,6 @@ image_generation = gr.Interface(
|
|
296 |
|
297 |
# Showcase the demo using different tabs of the different features
|
298 |
with demo:
|
299 |
-
gr.TabbedInterface([audio_translate, file_translate, text_translate, image_generation], ["Speech to Text", "Audio
|
300 |
|
301 |
demo.launch()
|
|
|
97 |
]
|
98 |
|
99 |
# CSS
|
100 |
+
'''css="""
|
101 |
#col-container {
|
102 |
margin: 0 auto;
|
103 |
max-width: 520px;
|
104 |
}
|
105 |
+
"""'''
|
106 |
|
107 |
demo = gr.Blocks()
|
108 |
|
|
|
118 |
# File translation using uploaded files as input
|
119 |
audio_translate = gr.Interface(
|
120 |
fn=speech_to_speech_translation,
|
121 |
+
inputs=gr.Audio(source="upload", type="filepath"),
|
122 |
outputs=gr.Audio(label="Generated Speech", type="numpy"),
|
123 |
examples=[["./english.wav"], ["./chinese.wav"]],
|
124 |
title=title,
|
|
|
296 |
|
297 |
# Showcase the demo using different tabs of the different features
|
298 |
with demo:
|
299 |
+
gr.TabbedInterface([audio_translate, file_translate, text_translate, image_generation], ["Speech to Text", "Audio to Text", "Text to Speech", "Text to Image"])
|
300 |
|
301 |
demo.launch()
|