Spaces:
Running
Running
seawolf2357
commited on
Commit
ยท
2796462
1
Parent(s):
666e5ff
Update app.py
Browse files
app.py
CHANGED
@@ -28,13 +28,18 @@ def generate_audio(text):
|
|
28 |
raise Exception(f"์ค๋ฅ ๋ฐ์. ์ํ ์ฝ๋: {response.status_code}")
|
29 |
|
30 |
# Gradio ์ธํฐํ์ด์ค ์ ์
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
|
|
|
|
|
|
|
|
|
|
38 |
|
39 |
if __name__ == "__main__":
|
40 |
-
|
|
|
28 |
raise Exception(f"์ค๋ฅ ๋ฐ์. ์ํ ์ฝ๋: {response.status_code}")
|
29 |
|
30 |
# Gradio ์ธํฐํ์ด์ค ์ ์
|
31 |
+
with gr.Blocks() as demo:
|
32 |
+
gr.Markdown("### ํ
์คํธ๋ฅผ ์์ฑ์ผ๋ก ๋ณํ")
|
33 |
+
gr.Markdown("Eleven Labs API๋ฅผ ์ฌ์ฉํ์ฌ ํ
์คํธ๋ฅผ ์์ฑ์ผ๋ก ๋ณํํฉ๋๋ค.")
|
34 |
+
text_input = gr.Textbox(label="๋ณํํ ํ
์คํธ๋ฅผ ์
๋ ฅํ์ธ์.")
|
35 |
+
submit_button = gr.Button("์์ฑ")
|
36 |
+
audio_output = gr.Audio(label="์์ฑ๋ ์ค๋์ค")
|
37 |
+
|
38 |
+
submit_button.click(
|
39 |
+
fn=generate_audio,
|
40 |
+
inputs=text_input,
|
41 |
+
outputs=audio_output
|
42 |
+
)
|
43 |
|
44 |
if __name__ == "__main__":
|
45 |
+
demo.launch()
|