Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -98,7 +98,8 @@ with gr.Blocks() as demo:
|
|
98 |
|
99 |
login = gr.LoginButton()
|
100 |
state = gr.State(value=None)
|
101 |
-
|
|
|
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 |
+
|