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

show error toast message if user is not logged in

Browse files
Files changed (1) hide show
  1. app.py +1 -0
app.py CHANGED
@@ -116,6 +116,7 @@ def split_upload_model(model_path: str, outdir: str, repo_id: str, oauth_token:
116
 
117
  def process_model(model_id, q_method, use_imatrix, imatrix_q_method, private_repo, train_data_file, split_model, split_max_tensors, split_max_size, oauth_token: gr.OAuthToken | None):
118
  if oauth_token is None or oauth_token.token is None:
 
119
  raise ValueError("You must be logged in to use GGUF-my-repo")
120
  model_name = model_id.split('/')[-1]
121
 
 
116
 
117
  def process_model(model_id, q_method, use_imatrix, imatrix_q_method, private_repo, train_data_file, split_model, split_max_tensors, split_max_size, oauth_token: gr.OAuthToken | None):
118
  if oauth_token is None or oauth_token.token is None:
119
+ gr.Error("You must be logged in to use GGUF-my-repo")
120
  raise ValueError("You must be logged in to use GGUF-my-repo")
121
  model_name = model_id.split('/')[-1]
122