Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -13,23 +13,24 @@ text = gr.Interface(
|
|
13 |
outputs=gr.Image(label="Text describe the image",
|
14 |
type="pil")
|
15 |
)
|
16 |
-
|
|
|
17 |
#text = itt_pipe(input)
|
18 |
|
19 |
|
20 |
-
tts_pipe = pipeline("text-to-speech",
|
21 |
-
model="kakao-enterprise/vits-ljs")
|
22 |
|
23 |
|
24 |
-
narrated_text = tts_pipe(tts_pipe[0]['generated_text'])
|
25 |
|
26 |
-
def launch(text):
|
27 |
-
out = tts_pipe(text)
|
28 |
-
audio = IPythonAudio(out["audio"][0],
|
29 |
-
rate=out["sampling_rate"])
|
30 |
-
return audio
|
31 |
|
32 |
-
iface = gr.Interface(launch,
|
33 |
inputs=gr.Image(type='pil'),
|
34 |
outputs="text")
|
35 |
|
|
|
13 |
outputs=gr.Image(label="Text describe the image",
|
14 |
type="pil")
|
15 |
)
|
16 |
+
text.launch()
|
17 |
+
print(text)
|
18 |
#text = itt_pipe(input)
|
19 |
|
20 |
|
21 |
+
#tts_pipe = pipeline("text-to-speech",
|
22 |
+
# model="kakao-enterprise/vits-ljs")
|
23 |
|
24 |
|
25 |
+
#narrated_text = tts_pipe(tts_pipe[0]['generated_text'])
|
26 |
|
27 |
+
#def launch(text):
|
28 |
+
# out = tts_pipe(text)
|
29 |
+
# audio = IPythonAudio(out["audio"][0],
|
30 |
+
# rate=out["sampling_rate"])
|
31 |
+
# return audio
|
32 |
|
33 |
+
#iface = gr.Interface(launch,
|
34 |
inputs=gr.Image(type='pil'),
|
35 |
outputs="text")
|
36 |
|