cgeorgiaw HF Staff commited on
Commit
ef27773
·
1 Parent(s): 11eca4d

testing gradio button

Browse files
Files changed (2) hide show
  1. app.py +3 -0
  2. submit.py +4 -0
app.py CHANGED
@@ -163,6 +163,9 @@ with gr.Blocks(theme=gr.themes.Monochrome(text_size=sizes.text_lg)) as demo:
163
  placeholder="Enter your Hugging Face username",
164
  info="This will be used to identify valid submissions, and to update your results if you submit again.",
165
  )
 
 
 
166
  anonymous_checkbox = gr.Checkbox(
167
  label="Anonymous",
168
  value=False,
 
163
  placeholder="Enter your Hugging Face username",
164
  info="This will be used to identify valid submissions, and to update your results if you submit again.",
165
  )
166
+
167
+ gr.LoginButton()
168
+
169
  anonymous_checkbox = gr.Checkbox(
170
  label="Anonymous",
171
  value=False,
submit.py CHANGED
@@ -66,7 +66,11 @@ def make_submission(
66
  model_description: str = "",
67
  anonymous: bool = False,
68
  registration_code: str = "",
 
69
  ):
 
 
 
70
  user_state = user_state
71
  validate_username(user_state)
72
 
 
66
  model_description: str = "",
67
  anonymous: bool = False,
68
  registration_code: str = "",
69
+ profile: gr.OAuthProfile | None = None,
70
  ):
71
+
72
+ if profile:
73
+ user_state = profile.name
74
  user_state = user_state
75
  validate_username(user_state)
76