Update app.py
Browse files
app.py
CHANGED
@@ -14,8 +14,6 @@ def configure_chatbot(email, password):
|
|
14 |
global chatbot
|
15 |
chatbot = Chatbot(config=config)
|
16 |
|
17 |
-
|
18 |
-
|
19 |
def ask_bot(prompt):
|
20 |
message = ""
|
21 |
for data in chatbot.ask(prompt):
|
@@ -40,7 +38,7 @@ with gr.Blocks() as demo:
|
|
40 |
password = gr.Textbox(label="请输入openAI的登录密码")
|
41 |
login = gr.Button("输完箱密点此登录")
|
42 |
login.click(configure_chatbot, inputs=[email, password])
|
43 |
-
elif
|
44 |
configure_chatbot(email, password)
|
45 |
|
46 |
gr.Markdown("""<h2>开始聊吧 ...</h2>""")
|
|
|
14 |
global chatbot
|
15 |
chatbot = Chatbot(config=config)
|
16 |
|
|
|
|
|
17 |
def ask_bot(prompt):
|
18 |
message = ""
|
19 |
for data in chatbot.ask(prompt):
|
|
|
38 |
password = gr.Textbox(label="请输入openAI的登录密码")
|
39 |
login = gr.Button("输完箱密点此登录")
|
40 |
login.click(configure_chatbot, inputs=[email, password])
|
41 |
+
elif password:
|
42 |
configure_chatbot(email, password)
|
43 |
|
44 |
gr.Markdown("""<h2>开始聊吧 ...</h2>""")
|