chasetank commited on
Commit
df49919
1 Parent(s): 473977d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -173,7 +173,7 @@ with gr.Blocks(css="#chatbot {overflow:auto; height:500px;}") as demo:
173
  <a href="https://huggingface.co/spaces/microsoft/visual_chatgpt?duplicate=true"><img src="https://bit.ly/3gLdBN6" alt="Duplicate Space"></a><br>
174
  </center>''')
175
 
176
- bot.init_agent()
177
  txt.submit(bot.run_text, [txt, state], [chatbot, state])
178
  txt.submit(lambda: "", None, txt)
179
  run.click(bot.run_text, [txt, state], [chatbot, state])
 
173
  <a href="https://huggingface.co/spaces/microsoft/visual_chatgpt?duplicate=true"><img src="https://bit.ly/3gLdBN6" alt="Duplicate Space"></a><br>
174
  </center>''')
175
 
176
+ openai_api_key_textbox.submit(bot.init_agent, [openai_api_key_textbox], [input_raws])
177
  txt.submit(bot.run_text, [txt, state], [chatbot, state])
178
  txt.submit(lambda: "", None, txt)
179
  run.click(bot.run_text, [txt, state], [chatbot, state])