Spaces:
Runtime error
Runtime error
Efreak
commited on
Commit
•
68c59a1
1
Parent(s):
3ad6cdb
warn nsfw (for PRs). add lovely message under html preview.
Browse files
app.py
CHANGED
@@ -55,13 +55,17 @@ def duplicate(source_url, preview_url, model_id, dst_repo, token, repo_type, nsf
|
|
55 |
|
56 |
if nsfw==True:
|
57 |
repopath=repopath+"/nsfw"
|
|
|
|
|
|
|
|
|
58 |
|
59 |
ret=api.upload_folder(
|
60 |
folder_path=dir,
|
61 |
path_in_repo=repopath,
|
62 |
repo_id=dst_repo,
|
63 |
repo_type="model",
|
64 |
-
commit_message=
|
65 |
commit_description="source: "+source_url+apimd+previewmd,
|
66 |
create_pr=make_pr
|
67 |
)
|
|
|
55 |
|
56 |
if nsfw==True:
|
57 |
repopath=repopath+"/nsfw"
|
58 |
+
commitmessage=f"{filename} (nsfw)"
|
59 |
+
previewhtml=previewhtml+"<br>now isn't that a lovely picture?"
|
60 |
+
else:
|
61 |
+
commitmessage=filename
|
62 |
|
63 |
ret=api.upload_folder(
|
64 |
folder_path=dir,
|
65 |
path_in_repo=repopath,
|
66 |
repo_id=dst_repo,
|
67 |
repo_type="model",
|
68 |
+
commit_message=commitmessage,
|
69 |
commit_description="source: "+source_url+apimd+previewmd,
|
70 |
create_pr=make_pr
|
71 |
)
|