Spaces:
Runtime error
Runtime error
Commit
•
198a005
1
Parent(s):
6286b29
Update app.py
Browse files
app.py
CHANGED
@@ -478,12 +478,11 @@ def check_token(token):
|
|
478 |
return gr.update(visible=False), gr.update(visible=False)
|
479 |
else:
|
480 |
if (user_data['auth']['accessToken']['role'] != "write"):
|
481 |
-
gr.Warning("Ops, you've uploaded a
|
482 |
else:
|
483 |
if user_data['canPay']:
|
484 |
return gr.update(visible=False), gr.update(visible=True)
|
485 |
else:
|
486 |
-
gr.Warning("Your payment method isn't set up. You gotta it up to start training")
|
487 |
return gr.update(visible=True), gr.update(visible=False)
|
488 |
|
489 |
return gr.update(visible=False), gr.update(visible=False)
|
@@ -814,8 +813,8 @@ To improve the quality of your outputs, you can add a custom caption for each im
|
|
814 |
token = gr.Textbox(label="Your Hugging Face write token", info="A Hugging Face write token you can obtain on the settings page", type="password", placeholder="hf_OhHiThIsIsNoTaReALToKeNGOoDTry")
|
815 |
with gr.Group(visible=False) as no_payment_method:
|
816 |
with gr.Row():
|
817 |
-
gr.
|
818 |
-
payment_setup = gr.Button("I have set up
|
819 |
|
820 |
start = gr.Button("Start training", visible=False, interactive=True)
|
821 |
progress_area = gr.Markdown("")
|
|
|
478 |
return gr.update(visible=False), gr.update(visible=False)
|
479 |
else:
|
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)
|
485 |
else:
|
|
|
486 |
return gr.update(visible=True), gr.update(visible=False)
|
487 |
|
488 |
return gr.update(visible=False), gr.update(visible=False)
|
|
|
813 |
token = gr.Textbox(label="Your Hugging Face write token", info="A Hugging Face write token you can obtain on the settings page", type="password", placeholder="hf_OhHiThIsIsNoTaReALToKeNGOoDTry")
|
814 |
with gr.Group(visible=False) as no_payment_method:
|
815 |
with gr.Row():
|
816 |
+
gr.HTML("<h3 style='margin: 0'>Your Hugging Face account doesn't have a payment method set up. Set one up [here](https://huggingface.co/settings/billing/payment) and come back here to train your LoRA</h3>")
|
817 |
+
payment_setup = gr.Button("I have set up a payment method")
|
818 |
|
819 |
start = gr.Button("Start training", visible=False, interactive=True)
|
820 |
progress_area = gr.Markdown("")
|