Efreak commited on
Commit
284f5a6
1 Parent(s): c90e9c6

correct url...i hope...and add commit message

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -45,11 +45,12 @@ def duplicate(source_url, preview_url, model_id, dst_repo, token, repo_type, nsf
45
  if nsfw==True:
46
  repopath=repopath+"/nsfw"
47
 
48
- api.upload_folder(
49
  folder_path=dir,
50
  path_in_repo=repopath,
51
  repo_id=dst_repo,
52
  repo_type="model",
 
53
  create_pr=make_pr
54
  )
55
 
@@ -57,7 +58,7 @@ def duplicate(source_url, preview_url, model_id, dst_repo, token, repo_type, nsf
57
  subprocess.check_call([r"rm","-rf",dir])
58
 
59
  return (
60
- f'Find your commit at the top of <a href=\'https://hf.co/{dst_repo}/commits/main{repopath}\' target="_blank" style="text-decoration:underline">your commits</a>',
61
  "sp.jpg",
62
  )
63
 
 
45
  if nsfw==True:
46
  repopath=repopath+"/nsfw"
47
 
48
+ ret=api.upload_folder(
49
  folder_path=dir,
50
  path_in_repo=repopath,
51
  repo_id=dst_repo,
52
  repo_type="model",
53
+ commit_messgage=filename,
54
  create_pr=make_pr
55
  )
56
 
 
58
  subprocess.check_call([r"rm","-rf",dir])
59
 
60
  return (
61
+ f'Find your commit at the top of <a href=\'https://hf.co/{dst_repo}/commits/main{repopath}\' target="_blank" style="text-decoration:underline">your commits</a>, if this wasn\'t a PR. Actually, i think <a href="{ret}">this</a> may be the correct url regardless, but I\'m not sure 🤷. hopefully puttimg it here doesn\'t break anything...',
62
  "sp.jpg",
63
  )
64