Update app.py
Browse files
app.py
CHANGED
@@ -216,9 +216,10 @@ async def random_news(peoples):
|
|
216 |
return output
|
217 |
|
218 |
Examples = [
|
219 |
-
["https://www.yahoo.com/news/shes-worlds-most-expensive-cow-040156493.html"],
|
220 |
-
["https://www.yahoo.com/
|
221 |
-
["https://www.yahoo.com/tech/super-hornet-armed-sm-6-180853983.html"],
|
|
|
222 |
]
|
223 |
with gr.Blocks(theme='soft', css=css, title="听说") as iface:
|
224 |
with gr.Accordion(""):
|
@@ -234,7 +235,7 @@ with gr.Blocks(theme='soft', css=css, title="听说") as iface:
|
|
234 |
random_btn = gr.Button("🤙 随机")
|
235 |
clear_btn = gr.ClearButton(output_box, value="🗑️ 清除") # Create a clear button
|
236 |
|
237 |
-
gr.Examples(examples=Examples, inputs=input_box, outputs=output_box, fn=main, label="示例", cache_examples="lazy")
|
238 |
|
239 |
# Set up the event listeners
|
240 |
submit_btn.click(main, inputs=[input_box,peoples], outputs=output_box)
|
|
|
216 |
return output
|
217 |
|
218 |
Examples = [
|
219 |
+
["https://www.yahoo.com/news/shes-worlds-most-expensive-cow-040156493.html","单人"],
|
220 |
+
["https://www.yahoo.com/entertainment/kevin-spacey-says-owes-many-220432469.html","双人"],
|
221 |
+
["https://www.yahoo.com/tech/super-hornet-armed-sm-6-180853983.html","双人"],
|
222 |
+
["https://www.yahoo.com/news/harvard-scientists-may-unknown-technologically-150917239.html","单人"],
|
223 |
]
|
224 |
with gr.Blocks(theme='soft', css=css, title="听说") as iface:
|
225 |
with gr.Accordion(""):
|
|
|
235 |
random_btn = gr.Button("🤙 随机")
|
236 |
clear_btn = gr.ClearButton(output_box, value="🗑️ 清除") # Create a clear button
|
237 |
|
238 |
+
gr.Examples(examples=Examples, inputs=[input_box,peoples], outputs=output_box, fn=main, label="示例", cache_examples="lazy")
|
239 |
|
240 |
# Set up the event listeners
|
241 |
submit_btn.click(main, inputs=[input_box,peoples], outputs=output_box)
|