echarlaix HF staff commited on
Commit
3dd4499
·
1 Parent(s): f5301ba

fix suffix model repo

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -61,7 +61,8 @@ def quantize_model(
61
  try:
62
  model_name = model_id.split("/")[-1]
63
  username = whoami(oauth_token.token)["name"]
64
- new_repo_id = f"{username}/{model_name}-openvino-{dtype}"
 
65
  library_name = TasksManager.infer_library_from_model(model_id, token=oauth_token.token)
66
 
67
  if library_name == "diffusers":
 
61
  try:
62
  model_name = model_id.split("/")[-1]
63
  username = whoami(oauth_token.token)["name"]
64
+ suffix = f"{dtype}" if model_name.endswith("openvino") else f"openvino-{dtype}"
65
+ new_repo_id = f"{username}/{model_name}-{suffix}"
66
  library_name = TasksManager.infer_library_from_model(model_id, token=oauth_token.token)
67
 
68
  if library_name == "diffusers":