Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -10,14 +10,13 @@ tts_pipe = pipeline("text-to-speech",
|
|
10 |
|
11 |
def launch(input):
|
12 |
out = pipe(input)
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
return out[0]['generated_text']
|
17 |
|
18 |
iface = gr.Interface(launch,
|
19 |
inputs=gr.Image(type='pil'),
|
20 |
-
outputs="text")
|
21 |
iface.launch()
|
22 |
|
23 |
|
|
|
10 |
|
11 |
def launch(input):
|
12 |
out = pipe(input)
|
13 |
+
out_tts = tts_pipe(out[0]['generated_text'])
|
14 |
+
return out[0]['generated_text'], (out_tts["sampling_rate"],out_tts["audio"][0])
|
15 |
+
|
|
|
16 |
|
17 |
iface = gr.Interface(launch,
|
18 |
inputs=gr.Image(type='pil'),
|
19 |
+
outputs=["text","audio"])
|
20 |
iface.launch()
|
21 |
|
22 |
|