baxin commited on
Commit
a0358a8
·
verified ·
1 Parent(s): ea20b3e

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +2 -2
main.py CHANGED
@@ -71,11 +71,11 @@ with gr.Blocks() as app:
71
  gr.Markdown("## Opentrons Protocol Analyzer")
72
  textbox = gr.Textbox(lines=12, label="Paste protocol Python code")
73
  send_button = gr.Button(value="Analyze")
74
- chatbot = gr.Chatbot(label="Results")
75
  clear_button = gr.ClearButton([textbox, chatbot])
76
 
77
  send_button.click(send_message, [textbox, chatbot], [chatbot])
78
- textbox.submit(send_message, [textbox, chatbot], [chatbot]) # Enterでも送信
79
 
80
  if __name__ == "__main__":
81
  app.launch(server_name="0.0.0.0", server_port=int(os.getenv("PORT", "7860")))
 
71
  gr.Markdown("## Opentrons Protocol Analyzer")
72
  textbox = gr.Textbox(lines=12, label="Paste protocol Python code")
73
  send_button = gr.Button(value="Analyze")
74
+ chatbot = gr.Chatbot(label="Results", type="tuple") # ← ここ重要
75
  clear_button = gr.ClearButton([textbox, chatbot])
76
 
77
  send_button.click(send_message, [textbox, chatbot], [chatbot])
78
+ textbox.submit(send_message, [textbox, chatbot], [chatbot])
79
 
80
  if __name__ == "__main__":
81
  app.launch(server_name="0.0.0.0", server_port=int(os.getenv("PORT", "7860")))