Ronaldo1111 commited on
Commit
5faebe1
·
verified ·
1 Parent(s): abcff2f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +14 -14
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
- value=background_images,
312
- label="🐎",
313
- show_label=False,
314
- columns=5, # 指定列数为 5
315
- height=200 # 设置高度
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="比如:你在干嘛?", lines=2)
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__ == '__main__':
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()