Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -303,25 +303,25 @@ html_content = html_content.replace('{popup_url}',popup_url)
|
|
303 |
html_content = html_content.replace('{balloon_url}',balloon_url)
|
304 |
|
305 |
with gr.Blocks(theme=gr.themes.Soft()) as demo:
|
306 |
-
|
307 |
gr.HTML(html_content)
|
308 |
|
309 |
-
gr.Markdown("### 🎂 🐎Gallery")
|
310 |
-
gallery = gr.Gallery(
|
311 |
-
|
312 |
-
|
313 |
-
|
314 |
-
|
315 |
-
|
316 |
-
)
|
317 |
|
318 |
gr.Markdown("## 🌸 Horse and 7 Agent:欢迎进入豌豆的世界 ")
|
319 |
chatbot = gr.Chatbot(label="Pea", type="messages", show_copy_button=True)
|
320 |
-
msg = gr.Textbox(label="想对豌豆说啥?", placeholder="
|
321 |
state = gr.State([])
|
|
|
322 |
btn = gr.Button("投喂")
|
323 |
-
btn.click(chat, inputs=[msg,state], outputs=[chatbot,state])
|
324 |
-
msg.submit(chat, inputs=[msg,state], outputs=[chatbot,state])
|
325 |
|
326 |
-
if __name__ ==
|
327 |
-
demo.launch()
|
|
|
303 |
html_content = html_content.replace('{balloon_url}',balloon_url)
|
304 |
|
305 |
with gr.Blocks(theme=gr.themes.Soft()) as demo:
|
|
|
306 |
gr.HTML(html_content)
|
307 |
|
308 |
+
gr.Markdown("### 🎂 🐎Gallery")
|
309 |
+
gallery = gr.Gallery(
|
310 |
+
value=background_images,
|
311 |
+
label="🐎",
|
312 |
+
show_label=False,
|
313 |
+
columns=5,
|
314 |
+
height=200
|
315 |
+
)
|
316 |
|
317 |
gr.Markdown("## 🌸 Horse and 7 Agent:欢迎进入豌豆的世界 ")
|
318 |
chatbot = gr.Chatbot(label="Pea", type="messages", show_copy_button=True)
|
319 |
+
msg = gr.Textbox(label="想对豌豆说啥?", placeholder="小勾巴,你想说什么?", lines=2)
|
320 |
state = gr.State([])
|
321 |
+
|
322 |
btn = gr.Button("投喂")
|
323 |
+
btn.click(chat, inputs=[msg, state], outputs=[chatbot, state])
|
324 |
+
msg.submit(chat, inputs=[msg, state], outputs=[chatbot, state])
|
325 |
|
326 |
+
if __name__ == "__main__":
|
327 |
+
demo.launch()
|