Ubik80 commited on
Commit
a757509
·
verified ·
1 Parent(s): fd5a08b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -98,7 +98,8 @@ with gr.Blocks() as demo:
98
 
99
  login = gr.LoginButton()
100
  state = gr.State(value=None)
101
- login.click(lambda user: user, inputs=[login], outputs=[state])
 
102
 
103
  run_all_btn = gr.Button("Run Evaluation & Submit All Answers")
104
  test_btn = gr.Button("Test Random Question")
@@ -113,3 +114,4 @@ with gr.Blocks() as demo:
113
 
114
  if __name__ == "__main__":
115
  demo.launch(debug=True, share=False)
 
 
98
 
99
  login = gr.LoginButton()
100
  state = gr.State(value=None)
101
+ # Store OAuthProfile in state when user logs in
102
+ login.click(fn=lambda profile: profile, inputs=[], outputs=[state])
103
 
104
  run_all_btn = gr.Button("Run Evaluation & Submit All Answers")
105
  test_btn = gr.Button("Test Random Question")
 
114
 
115
  if __name__ == "__main__":
116
  demo.launch(debug=True, share=False)
117
+