Update app.py
Browse files
app.py
CHANGED
@@ -227,16 +227,17 @@ with gr.Blocks(theme='soft', css=css, title="听说") as iface:
|
|
227 |
input_box = gr.Textbox(label="网址", placeholder="请输入https开头的网址")
|
228 |
with gr.Row():
|
229 |
peoples = gr.Radio(["单人","双人"],value="双人",label="播音员人数")
|
230 |
-
if peoples == "双人":
|
231 |
-
system_prompt = double_prompt;
|
232 |
-
else:
|
233 |
-
system_prompt = single_prompt;
|
234 |
with gr.Row():
|
235 |
submit_btn = gr.Button("🚀 发送") # Create a submit button
|
236 |
random_btn = gr.Button("🤙 随机")
|
237 |
clear_btn = gr.ClearButton(output_box, value="🗑️ 清除") # Create a clear button
|
|
|
238 |
gr.Examples(examples=Examples, inputs=input_box, outputs=output_box, fn=main, label="示例", cache_examples="lazy")
|
239 |
-
|
|
|
|
|
|
|
|
|
240 |
# Set up the event listeners
|
241 |
submit_btn.click(main, inputs=input_box, outputs=output_box)
|
242 |
random_btn.click(fn=random_news, outputs=output_box)
|
|
|
227 |
input_box = gr.Textbox(label="网址", placeholder="请输入https开头的网址")
|
228 |
with gr.Row():
|
229 |
peoples = gr.Radio(["单人","双人"],value="双人",label="播音员人数")
|
|
|
|
|
|
|
|
|
230 |
with gr.Row():
|
231 |
submit_btn = gr.Button("🚀 发送") # Create a submit button
|
232 |
random_btn = gr.Button("🤙 随机")
|
233 |
clear_btn = gr.ClearButton(output_box, value="🗑️ 清除") # Create a clear button
|
234 |
+
|
235 |
gr.Examples(examples=Examples, inputs=input_box, outputs=output_box, fn=main, label="示例", cache_examples="lazy")
|
236 |
+
|
237 |
+
if peoples == "双人":
|
238 |
+
system_prompt = double_prompt
|
239 |
+
else:
|
240 |
+
system_prompt = single_prompt
|
241 |
# Set up the event listeners
|
242 |
submit_btn.click(main, inputs=input_box, outputs=output_box)
|
243 |
random_btn.click(fn=random_news, outputs=output_box)
|