Spaces:
Runtime error
Runtime error
Update app.py
Browse files113 unmodified lines1141151161171181191201211221231241251261271281291301311324 unmodified lines137138139113 unmodified lines],height=200,)with gr.Row():with gr.Column(scale=2):chatbot = gr.Chatbot([("Hello", "Hi")], label="Chatbot")chat_btn = gr.Button("Add messages")chat_btn.click(lambda history: history+ [["How are you?", "I am good."]]+ (time.sleep(2) or []),chatbot,chatbot,)with gr.Column(scale=1):with gr.Accordion("Advanced Settings"):gr.Markdown("Hello")4 unmodified linesif __name__ == "__main__":demo.queue().launch(theme='rocketpal/apple-light')113 unmodified lines1141151161171181191201211221231241251261271281291301311321331341351361371384 unmodified lines143144145146113 unmodified lines],height=200,)with gr.Row():with gr.Column(scale=2):chatbot = gr.Chatbot(value=[{"role": "user", "content": "Hello"},{"role": "assistant", "content": "Hi"}],label="Chatbot")chat_btn = gr.Button("Add messages")def add_messages(history):time.sleep(2)history.append({"role": "user", "content": "How are you?"})history.append({"role": "assistant", "content": "I am good."})return historychat_btn.click(add_messages, chatbot, chatbot)with gr.Column(scale=1):with gr.Accordion("Advanced Settings"):gr.Markdown("Hello")4 unmodified linesif __name__ == "__main__":demo.queue().launch(theme='rocketpal/apple-light')
app.py+16-9