Spaces:
Sleeping
Sleeping
elibrowne
commited on
Commit
·
f14dfb1
1
Parent(s):
505427d
Forces email
Browse files
app.py
CHANGED
@@ -293,6 +293,13 @@ with gr.Blocks(theme = theme) as user_eval:
|
|
293 |
gr.Markdown("Thank you so much for your participation in our study! We're using emails to keep track of which questions you've answered and which you haven't seen. Use the same email every time to keep your progress saved. :)")
|
294 |
email = gr.Textbox(label = "Email", placeholder = "[email protected]")
|
295 |
s = gr.Button("Start!")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
296 |
|
297 |
def submit_email(email):
|
298 |
global user_id
|
|
|
293 |
gr.Markdown("Thank you so much for your participation in our study! We're using emails to keep track of which questions you've answered and which you haven't seen. Use the same email every time to keep your progress saved. :)")
|
294 |
email = gr.Textbox(label = "Email", placeholder = "[email protected]")
|
295 |
s = gr.Button("Start!")
|
296 |
+
|
297 |
+
def sanitize_login(text):
|
298 |
+
if text == "":
|
299 |
+
return {s: gr.Button(interactive = False)}
|
300 |
+
else:
|
301 |
+
return {s: gr.Button(interactive = True)}
|
302 |
+
email.change(fn = sanitize_login, inputs = [email], outputs = [s])
|
303 |
|
304 |
def submit_email(email):
|
305 |
global user_id
|