Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -33,7 +33,7 @@ def clear_cache():
|
|
33 |
if repo.repo_type == "model":
|
34 |
to_delete.append([rev.commit_hash for rev in repo.revisions])
|
35 |
|
36 |
-
scan.delete_revisions(
|
37 |
|
38 |
print("Cache has been cleared")
|
39 |
|
@@ -75,7 +75,7 @@ def upload_to_hub(path, upload_repo, hf_path, token):
|
|
75 |
|
76 |
logging.set_verbosity_info()
|
77 |
|
78 |
-
api = HfApi()
|
79 |
api.create_repo(repo_id=upload_repo, exist_ok=True)
|
80 |
api.upload_folder(
|
81 |
folder_path=path,
|
|
|
33 |
if repo.repo_type == "model":
|
34 |
to_delete.append([rev.commit_hash for rev in repo.revisions])
|
35 |
|
36 |
+
scan.delete_revisions(to_delete)
|
37 |
|
38 |
print("Cache has been cleared")
|
39 |
|
|
|
75 |
|
76 |
logging.set_verbosity_info()
|
77 |
|
78 |
+
api = HfApi(token=token)
|
79 |
api.create_repo(repo_id=upload_repo, exist_ok=True)
|
80 |
api.upload_folder(
|
81 |
folder_path=path,
|