multimodalart HF staff commited on
Commit
67af939
1 Parent(s): 47aae2b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -181,9 +181,9 @@ def start_training(
181
  if whoami()["auth"]["accessToken"]["role"] == "write" or "repo.write" in whoami()["auth"]["accessToken"]["fineGrained"]["scoped"][0]["permissions"]:
182
  gr.Info(f"Starting training locally {whoami()['name']}. Your LoRA will be available locally and in Hugging Face after it finishes.")
183
  else:
184
- raise gr.Error(f"You logged in to Hugging Face with not enough permissions, you need a token that allows writing to {whoami()['name']} profile.")
185
  except:
186
- raise gr.Error(f"You logged in to Hugging Face with not enough permissions, you need a token that allows writing to {whoami()['name']} profile.")
187
 
188
  print("Started training")
189
  slugged_lora_name = slugify(lora_name)
 
181
  if whoami()["auth"]["accessToken"]["role"] == "write" or "repo.write" in whoami()["auth"]["accessToken"]["fineGrained"]["scoped"][0]["permissions"]:
182
  gr.Info(f"Starting training locally {whoami()['name']}. Your LoRA will be available locally and in Hugging Face after it finishes.")
183
  else:
184
+ raise gr.Error(f"You logged in to Hugging Face with not enough permissions, you need a token that allows writing to your profile.")
185
  except:
186
+ raise gr.Error(f"You logged in to Hugging Face with not enough permissions, you need a token that allows writing to your profile.")
187
 
188
  print("Started training")
189
  slugged_lora_name = slugify(lora_name)