Pierre Andrews commited on
Commit
512f701
·
1 Parent(s): 31f65c0

disconnect login

Browse files
Files changed (1) hide show
  1. app.py +4 -5
app.py CHANGED
@@ -287,7 +287,7 @@ def update_button(checked):
287
  def new_user(username):
288
  with gr.Blocks():
289
  gr.Markdown(f"""
290
- Thank you for login, your HuggingFace username is `{username}`,
291
  we will use the same username for our annotation tool.
292
 
293
  # Contributing to Meta Open Source Projects
@@ -316,12 +316,12 @@ def new_user(username):
316
  The BOUQuET 💐 dataset is being translated with [this tool]({argilla_endpoint}).
317
  For you to participate in the data collection, we need to create a translator account in
318
  the annotation tool. This is separate from your huggingface account but will share the same
319
- username: {username}.
320
 
321
  Please agree to the CLA and create a new password for your translator account.
322
  """)
323
 
324
- name_input = gr.Textbox(label="Username", interactive=False, value=username)
325
  password_input = gr.Textbox(label="Password", type="password")
326
 
327
  out = gr.Markdown()
@@ -346,7 +346,6 @@ def maybe_loggedin() -> str:
346
  please_login()
347
  else:
348
  username = me['name']
349
- print(username)
350
  rg_user = rg_client.users(username)
351
  if rg_user is None:
352
  new_user(username)
@@ -355,7 +354,7 @@ def maybe_loggedin() -> str:
355
 
356
  def login_tab():
357
  with gr.Tab("Contribute"):
358
- if not rg_client:
359
  gr.Markdown("We are currently setting up the translation collection system, it will be available for contributions later today.")
360
  else:
361
  maybe_loggedin()
 
287
  def new_user(username):
288
  with gr.Blocks():
289
  gr.Markdown(f"""
290
+ Thank you for login, your HuggingFace username is `{username.value}`,
291
  we will use the same username for our annotation tool.
292
 
293
  # Contributing to Meta Open Source Projects
 
316
  The BOUQuET 💐 dataset is being translated with [this tool]({argilla_endpoint}).
317
  For you to participate in the data collection, we need to create a translator account in
318
  the annotation tool. This is separate from your huggingface account but will share the same
319
+ username: {username.value}.
320
 
321
  Please agree to the CLA and create a new password for your translator account.
322
  """)
323
 
324
+ name_input = gr.Textbox(label="Username", interactive=False, value=username.value)
325
  password_input = gr.Textbox(label="Password", type="password")
326
 
327
  out = gr.Markdown()
 
346
  please_login()
347
  else:
348
  username = me['name']
 
349
  rg_user = rg_client.users(username)
350
  if rg_user is None:
351
  new_user(username)
 
354
 
355
  def login_tab():
356
  with gr.Tab("Contribute"):
357
+ if True:
358
  gr.Markdown("We are currently setting up the translation collection system, it will be available for contributions later today.")
359
  else:
360
  maybe_loggedin()