multimodalart HF staff commited on
Commit
f4416a9
1 Parent(s): a9aaca0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -476,8 +476,9 @@ def check_token(token):
476
  except Exception as e:
477
  raise gr.Warning("Invalid user token. Make sure to get your Hugging Face token from the settings page")
478
  else:
 
479
  if (user_data['auth']['accessToken']['role'] != "write"):
480
- gr.Warning("Oops, you've uploaded a `Read` token. You need to use a Write token!")
481
  else:
482
  if user_data['canPay']:
483
  return gr.update(visible=False), gr.update(visible=True)
@@ -815,11 +816,12 @@ To improve the quality of your outputs, you can add a custom caption for each im
815
  with gr.Row():
816
  gr.Markdown("## Your Hugging Face account doesn't have a payment method. Set it up [here](https://huggingface.co/settings/billing/payment) to train your LoRA")
817
  payment_setup = gr.Button("I have set up my payment method")
 
818
  start = gr.Button("Start training", visible=False, interactive=True)
819
  progress_area = gr.Markdown("")
 
820
  output_components.insert(1, advanced)
821
  output_components.insert(1, cost_estimation)
822
-
823
  gr.on(
824
  triggers=[
825
  token.change,
 
476
  except Exception as e:
477
  raise gr.Warning("Invalid user token. Make sure to get your Hugging Face token from the settings page")
478
  else:
479
+ print(user_data)
480
  if (user_data['auth']['accessToken']['role'] != "write"):
481
+ gr.Warning("Ops, you've uploaded a `Read` token. You need to use a Write token!")
482
  else:
483
  if user_data['canPay']:
484
  return gr.update(visible=False), gr.update(visible=True)
 
816
  with gr.Row():
817
  gr.Markdown("## Your Hugging Face account doesn't have a payment method. Set it up [here](https://huggingface.co/settings/billing/payment) to train your LoRA")
818
  payment_setup = gr.Button("I have set up my payment method")
819
+
820
  start = gr.Button("Start training", visible=False, interactive=True)
821
  progress_area = gr.Markdown("")
822
+
823
  output_components.insert(1, advanced)
824
  output_components.insert(1, cost_estimation)
 
825
  gr.on(
826
  triggers=[
827
  token.change,