Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -59,7 +59,7 @@ def gradio_interface():
|
|
| 59 |
# Định dạng lại giao diện với hai cột
|
| 60 |
with gr.Row():
|
| 61 |
# Cột bên trái: Nhập Text, chọn Model, Voice, Speed và nút Generate
|
| 62 |
-
with gr.Column():
|
| 63 |
api_key = gr.Textbox(type='password', label='Enter your OpenAI API Key', placeholder='Enter your OpenAI API key')
|
| 64 |
|
| 65 |
model = gr.Dropdown(choices=['tts-1', 'tts-1-hd'], label='Model', value='tts-1')
|
|
@@ -77,7 +77,7 @@ def gradio_interface():
|
|
| 77 |
btn = gr.Button("Generate Speech")
|
| 78 |
|
| 79 |
# Cột bên phải: Upload audio và Speech Output
|
| 80 |
-
with gr.Column():
|
| 81 |
input_type = gr.Radio(["Text", "Audio"], label="Input Type", value="Text")
|
| 82 |
audio_file = gr.File(label="Upload Audio File")
|
| 83 |
output_audio = gr.Audio(label="Speech Output")
|
|
@@ -95,4 +95,4 @@ def gradio_interface():
|
|
| 95 |
demo.launch()
|
| 96 |
|
| 97 |
if __name__ == "__main__":
|
| 98 |
-
gradio_interface()
|
|
|
|
| 59 |
# Định dạng lại giao diện với hai cột
|
| 60 |
with gr.Row():
|
| 61 |
# Cột bên trái: Nhập Text, chọn Model, Voice, Speed và nút Generate
|
| 62 |
+
with gr.Column(scale=2): # Thêm `scale` để điều chỉnh kích thước cột
|
| 63 |
api_key = gr.Textbox(type='password', label='Enter your OpenAI API Key', placeholder='Enter your OpenAI API key')
|
| 64 |
|
| 65 |
model = gr.Dropdown(choices=['tts-1', 'tts-1-hd'], label='Model', value='tts-1')
|
|
|
|
| 77 |
btn = gr.Button("Generate Speech")
|
| 78 |
|
| 79 |
# Cột bên phải: Upload audio và Speech Output
|
| 80 |
+
with gr.Column(scale=2): # Thêm `scale` để điều chỉnh kích thước cột
|
| 81 |
input_type = gr.Radio(["Text", "Audio"], label="Input Type", value="Text")
|
| 82 |
audio_file = gr.File(label="Upload Audio File")
|
| 83 |
output_audio = gr.Audio(label="Speech Output")
|
|
|
|
| 95 |
demo.launch()
|
| 96 |
|
| 97 |
if __name__ == "__main__":
|
| 98 |
+
gradio_interface()
|