Oleg Shulyakov commited on
Commit
9250e33
·
1 Parent(s): e395b9b

Fix output filename

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -459,19 +459,19 @@ def update_output_repo(model_id, oauth_token: gr.OAuthToken | None):
459
  return ""
460
 
461
  username = whoami(oauth_token.token)["name"]
462
- model_name = model_id.split('/')[-1]
463
  return f"{username}/{model_name}-GGUF"
464
 
465
  def update_output_filename(model_id, use_imatrix, q_method, imatrix_q_method):
466
  if model_id is None:
467
  return ""
468
 
469
- model_name = model_id.split('/')[-1]
470
 
471
  if use_imatrix:
472
- return f"{model_name.lower()}-{imatrix_q_method.upper()}-imat.gguf"
473
 
474
- return f"{model_name.lower()}-{q_method.upper()}.gguf"
475
 
476
  #####
477
  # Buttons section
 
459
  return ""
460
 
461
  username = whoami(oauth_token.token)["name"]
462
+ model_name = get_model_name(model_id)
463
  return f"{username}/{model_name}-GGUF"
464
 
465
  def update_output_filename(model_id, use_imatrix, q_method, imatrix_q_method):
466
  if model_id is None:
467
  return ""
468
 
469
+ model_name = get_model_name(model_id)
470
 
471
  if use_imatrix:
472
+ return f"{model_name}-{imatrix_q_method.upper()}-imat.gguf"
473
 
474
+ return f"{model_name}-{q_method.upper()}.gguf"
475
 
476
  #####
477
  # Buttons section