Spaces:
Sleeping
Sleeping
Upload app.py
Browse files
app.py
CHANGED
|
@@ -75,21 +75,25 @@ with gr.Blocks(theme=gr.themes.Monochrome()) as iface:
|
|
| 75 |
gr.Markdown("# 🎙️ Generated Podcast Audio. Deployed by 江信宗")
|
| 76 |
|
| 77 |
input_text = gr.Textbox(label="請輸入您的文字")
|
| 78 |
-
Language = gr.Dropdown(choices=["繁體中文", "Auto Detect", "英文"], value="繁體中文", label="語言")
|
| 79 |
|
| 80 |
-
|
| 81 |
-
|
| 82 |
-
|
| 83 |
-
|
| 84 |
-
"
|
| 85 |
-
"
|
| 86 |
-
"
|
| 87 |
-
"
|
| 88 |
-
"
|
| 89 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 90 |
|
| 91 |
-
Speaker_1 = gr.Dropdown(choices=speaker_choices, value=speaker_choices[0], label="主持人的語音")
|
| 92 |
-
Speaker_2 = gr.Dropdown(choices=speaker_choices, value=speaker_choices[1], label="來賓的語音")
|
| 93 |
api_key = gr.Textbox(label="API Key", type="password", placeholder="API authentication key for large language models")
|
| 94 |
output_text = gr.Textbox(label="生成的結果")
|
| 95 |
|
|
|
|
| 75 |
gr.Markdown("# 🎙️ Generated Podcast Audio. Deployed by 江信宗")
|
| 76 |
|
| 77 |
input_text = gr.Textbox(label="請輸入您的文字")
|
|
|
|
| 78 |
|
| 79 |
+
# 使用 Radio 替代 Dropdown
|
| 80 |
+
Language = gr.Radio(choices=["繁體中文", "Auto Detect", "英文"], value="繁體中文", label="語言")
|
| 81 |
+
|
| 82 |
+
speaker_choices = {
|
| 83 |
+
"Andrew - English (United States)": "Andrew - English (United States)",
|
| 84 |
+
"Ava - English (United States)": "Ava - English (United States)",
|
| 85 |
+
"Brian - English (United States)": "Brian - English (United States)",
|
| 86 |
+
"Emma - English (United States)": "Emma - English (United States)",
|
| 87 |
+
"Florian - German (Germany)": "Florian - German (Germany)",
|
| 88 |
+
"Seraphina - German (Germany)": "Seraphina - German (Germany)",
|
| 89 |
+
"Remy - French (France)": "Remy - French (France)",
|
| 90 |
+
"Vivienne - French (France)": "Vivienne - French (France)"
|
| 91 |
+
}
|
| 92 |
+
|
| 93 |
+
# 使用字典初始化 Dropdown
|
| 94 |
+
Speaker_1 = gr.Dropdown(choices=speaker_choices, value="Andrew - English (United States)", label="主持人的語音")
|
| 95 |
+
Speaker_2 = gr.Dropdown(choices=speaker_choices, value="Ava - English (United States)", label="來賓的語音")
|
| 96 |
|
|
|
|
|
|
|
| 97 |
api_key = gr.Textbox(label="API Key", type="password", placeholder="API authentication key for large language models")
|
| 98 |
output_text = gr.Textbox(label="生成的結果")
|
| 99 |
|