patrickvonplaten commited on
Commit
9c57b91
1 Parent(s): e7c1d62

Update convert.py

Browse files
Files changed (1) hide show
  1. convert.py +2 -2
convert.py CHANGED
@@ -73,8 +73,8 @@ def convert(token: str, model_id: str, filename: str, model_type: str, sample_si
73
  folder = convert_single(model_id, filename, model_type, sample_size, scheduler_type, extract_ema, folder)
74
  new_pr = api.upload_folder(folder_path=folder, path_in_repo="./", repo_id=model_id, repo_type="model", token=token, commit_description=COMMIT_MESSAGE.format(model_id), create_pr=True)
75
  pr_number = new_pr.split("%2F")[-1].split("/")[0]
76
- print(f"Pr created at: {'https://huggingface.co/' + os.path.join(model_id, 'discussions', pr_number)}")
77
  finally:
78
  shutil.rmtree(folder)
79
 
80
- return new_pr
 
73
  folder = convert_single(model_id, filename, model_type, sample_size, scheduler_type, extract_ema, folder)
74
  new_pr = api.upload_folder(folder_path=folder, path_in_repo="./", repo_id=model_id, repo_type="model", token=token, commit_description=COMMIT_MESSAGE.format(model_id), create_pr=True)
75
  pr_number = new_pr.split("%2F")[-1].split("/")[0]
76
+ link = f"Pr created at: {'https://huggingface.co/' + os.path.join(model_id, 'discussions', pr_number)}"
77
  finally:
78
  shutil.rmtree(folder)
79
 
80
+ return link