ngxson HF staff commited on
Commit
e78ab8b
·
verified ·
1 Parent(s): d930cea

fix error message for non logged in

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -58,7 +58,7 @@ def split_upload_model(model_path: str, outdir: str, repo_id: str, oauth_token:
58
  print(f"Model path: {model_path}")
59
  print(f"Output dir: {outdir}")
60
 
61
- if oauth_token.token is None:
62
  raise ValueError("You have to be logged in.")
63
 
64
  split_cmd = [
 
58
  print(f"Model path: {model_path}")
59
  print(f"Output dir: {outdir}")
60
 
61
+ if oauth_token is None or oauth_token.token is None:
62
  raise ValueError("You have to be logged in.")
63
 
64
  split_cmd = [