zss2341 commited on
Commit
e181aeb
·
1 Parent(s): 4c52a41

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -6,7 +6,7 @@ password = None
6
  access_token = None
7
  session_token = None
8
 
9
- def configure_chatbot(emailpassword):
10
  config = {}
11
  config.update({"email": email,
12
  "password": password})
@@ -36,12 +36,12 @@ with gr.Blocks() as demo:
36
  if not email or password:
37
  gr.Markdown("""<h2>请使用openAI账户登录</h2>""")
38
  with gr.Row():
39
- Email = gr.Textbox(placeholder="请输入openAI的邮箱地址")
40
  with gr.Row():
41
- Password = gr.Textbox(placeholder="请输入openAI的登录密码")
42
  with gr.Row():
43
  login = gr.Button("输完箱密点此登录")
44
- login.click(configure_chatbot, inputs=[EmailPassword])
45
  elif email and password:
46
  configure_chatbot(Email, Password)
47
 
 
6
  access_token = None
7
  session_token = None
8
 
9
+ def configure_chatbot(ep):
10
  config = {}
11
  config.update({"email": email,
12
  "password": password})
 
36
  if not email or password:
37
  gr.Markdown("""<h2>请使用openAI账户登录</h2>""")
38
  with gr.Row():
39
+ e = gr.Textbox(placeholder="请输入openAI的邮箱地址")
40
  with gr.Row():
41
+ p = gr.Textbox(placeholder="请输入openAI的登录密码")
42
  with gr.Row():
43
  login = gr.Button("输完箱密点此登录")
44
+ login.click(configure_chatbot, inputs=[ep])
45
  elif email and password:
46
  configure_chatbot(Email, Password)
47