Spaces:
Paused
Paused
Commit
ยท
5fcd0b6
1
Parent(s):
df7eba9
Delete app.py
Browse files
app.py
DELETED
@@ -1,34 +0,0 @@
|
|
1 |
-
import gradio as gr
|
2 |
-
import requests
|
3 |
-
import json
|
4 |
-
from utils import get_story, get_voice, get_music
|
5 |
-
|
6 |
-
with gr.Blocks() as performance:
|
7 |
-
with gr.Tab("Story Generation"):
|
8 |
-
chatbot = gr.Chatbot(label='GPT4', elem_id="chatbot")
|
9 |
-
input_text = gr.Textbox(lines=2, label="์์ ๋ฌธ์ฅ")
|
10 |
-
input_number = gr.Number(label='๋ฌธ์ฅ์')
|
11 |
-
state = gr.State([])
|
12 |
-
with gr.Row():
|
13 |
-
with gr.Column():
|
14 |
-
b1 = gr.Button().style(full_width=True)
|
15 |
-
b1.click(get_story, [input_text, input_number, chatbot, state], [chatbot, state])
|
16 |
-
|
17 |
-
with gr.Tab("Voice Generation"):
|
18 |
-
input_text = gr.Textbox(lines=10, label="๋ฌธ์ฅ")
|
19 |
-
input_gender = gr.Radio(["๋จ์ฑ", "์ฌ์ฑ"], label="์ฑ๋ณ")
|
20 |
-
input_age = gr.Radio(["์ด๋ฆฐ์ด", "์ฒญ์๋
", "์ฒญ๋
", "์ค๋
"], label="์ฐ๋ น๋")
|
21 |
-
with gr.Row():
|
22 |
-
with gr.Column():
|
23 |
-
b2 = gr.Button().style(full_width=True)
|
24 |
-
b2.click(get_voice, [input_text, input_gender, input_age], [gr.Audio(label="๊ฒฐ๊ณผ ์์ฑ ํ์ผ", type="filepath")])
|
25 |
-
|
26 |
-
with gr.Tab("Music Generation"):
|
27 |
-
input_text = gr.Textbox(lines=10, label="๋ฌธ์ฅ")
|
28 |
-
input_duration = gr.Number(label="์์
์๊ฐ")
|
29 |
-
with gr.Row():
|
30 |
-
with gr.Column():
|
31 |
-
b3 = gr.Button().style(full_width=True)
|
32 |
-
b3.click(get_music, [input_text, input_duration], gr.Audio(label="๊ฒฐ๊ณผ ์์
ํ์ผ", type='filepath'))
|
33 |
-
|
34 |
-
performance.queue(max_size=5).launch()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|