Spaces:
Build error
Build error
update
Browse files
app.py
CHANGED
|
@@ -155,6 +155,7 @@ with gr.Blocks(css="#chatbot {overflow: auto; height:500px;}") as demo:
|
|
| 155 |
lines=1,
|
| 156 |
type="password",
|
| 157 |
)
|
|
|
|
| 158 |
|
| 159 |
chatbot = gr.Chatbot(elem_id="chatbot", label="Visual ChatGPT")
|
| 160 |
state = gr.State([])
|
|
@@ -183,6 +184,7 @@ with gr.Blocks(css="#chatbot {overflow: auto; height:500px;}") as demo:
|
|
| 183 |
|
| 184 |
|
| 185 |
openai_api_key_textbox.submit(bot.init_agent, [openai_api_key_textbox], [input_raws])
|
|
|
|
| 186 |
txt.submit(bot.run_text, [txt, state], [chatbot, state])
|
| 187 |
txt.submit(lambda: "", None, txt)
|
| 188 |
run.click(bot.run_text, [txt, state], [chatbot, state])
|
|
|
|
| 155 |
lines=1,
|
| 156 |
type="password",
|
| 157 |
)
|
| 158 |
+
enter_apikey = gr.Button("🔑Enter")
|
| 159 |
|
| 160 |
chatbot = gr.Chatbot(elem_id="chatbot", label="Visual ChatGPT")
|
| 161 |
state = gr.State([])
|
|
|
|
| 184 |
|
| 185 |
|
| 186 |
openai_api_key_textbox.submit(bot.init_agent, [openai_api_key_textbox], [input_raws])
|
| 187 |
+
enter_apikey.click(bot.init_agent, [openai_api_key_textbox], [input_raws])
|
| 188 |
txt.submit(bot.run_text, [txt, state], [chatbot, state])
|
| 189 |
txt.submit(lambda: "", None, txt)
|
| 190 |
run.click(bot.run_text, [txt, state], [chatbot, state])
|