Spaces:
Configuration error
Configuration error
Upload app.py
Browse files
app.py
CHANGED
|
@@ -246,6 +246,11 @@ body {
|
|
| 246 |
padding: 5px !important;
|
| 247 |
border-radius: 10px !important;
|
| 248 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 249 |
"""
|
| 250 |
|
| 251 |
with gr.Blocks(theme=gr.themes.Monochrome(), css=custom_css) as iface:
|
|
@@ -303,10 +308,10 @@ with gr.Blocks(theme=gr.themes.Monochrome(), css=custom_css) as iface:
|
|
| 303 |
|
| 304 |
with gr.Row():
|
| 305 |
generate_button = gr.Button("生成 Podcast 節目及音檔", scale=2, elem_classes="gen-button")
|
| 306 |
-
api_key = gr.Textbox(label="API Key", type="password", placeholder="API authentication key for large language models", scale=1, elem_classes="api-background")
|
| 307 |
|
| 308 |
audio_output = gr.Audio(label="Generated Podcast Audio", elem_classes="audio-background")
|
| 309 |
-
podcast_script = gr.Textbox(label="Generated Podcast 劇本")
|
| 310 |
generate_button.click(fn=process_podcast, inputs=[input_text, Language, Speaker_1, Speaker_2, api_key], outputs=[podcast_script, audio_output])
|
| 311 |
|
| 312 |
if __name__ == "__main__":
|
|
|
|
| 246 |
padding: 5px !important;
|
| 247 |
border-radius: 10px !important;
|
| 248 |
}
|
| 249 |
+
.script-background {
|
| 250 |
+
background-color: #FEF9D9 !important;
|
| 251 |
+
padding: 15px !important;
|
| 252 |
+
border-radius: 10px !important;
|
| 253 |
+
}
|
| 254 |
"""
|
| 255 |
|
| 256 |
with gr.Blocks(theme=gr.themes.Monochrome(), css=custom_css) as iface:
|
|
|
|
| 308 |
|
| 309 |
with gr.Row():
|
| 310 |
generate_button = gr.Button("生成 Podcast 節目及音檔", scale=2, elem_classes="gen-button")
|
| 311 |
+
api_key = gr.Textbox(label="請輸入您的 API Key", type="password", placeholder="API authentication key for large language models", scale=1, elem_classes="api-background")
|
| 312 |
|
| 313 |
audio_output = gr.Audio(label="Generated Podcast Audio", elem_classes="audio-background")
|
| 314 |
+
podcast_script = gr.Textbox(label="Generated Podcast 劇本", elem_classes="script-background")
|
| 315 |
generate_button.click(fn=process_podcast, inputs=[input_text, Language, Speaker_1, Speaker_2, api_key], outputs=[podcast_script, audio_output])
|
| 316 |
|
| 317 |
if __name__ == "__main__":
|