Spaces:
Sleeping
Sleeping
Commit
·
2e3c786
1
Parent(s):
fdd3a00
Update main.py
Browse files
main.py
CHANGED
@@ -46,14 +46,6 @@ async def post_webhook(
|
|
46 |
def update_cloned_repo(payload: WebhookPayload):
|
47 |
# Create the update_cloned_repo project
|
48 |
snapshot_download(repo_id="SakethTest/ThirdParty",local_dir="./ThirdParty")
|
49 |
-
|
50 |
-
api.upload_folder(folder_path="./ThirdParty",repo_id="shellplc/ThirdParty",repo_type="model",commit_message="uploaded third party model",token="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")
|
51 |
-
except requests.HTTPError as err:
|
52 |
-
print("ERROR while requesting AutoTrain API:")
|
53 |
-
print(f" code: {err.response.status_code}")
|
54 |
-
print(f" {err.response.json()}")
|
55 |
-
raise
|
56 |
-
# Notify in the community tab
|
57 |
notify_success(project["id"])
|
58 |
-
|
59 |
return {"processed": True}
|
|
|
46 |
def update_cloned_repo(payload: WebhookPayload):
|
47 |
# Create the update_cloned_repo project
|
48 |
snapshot_download(repo_id="SakethTest/ThirdParty",local_dir="./ThirdParty")
|
49 |
+
api.upload_folder(folder_path="./ThirdParty",repo_id="shellplc/ThirdParty",repo_type="model",commit_message="uploaded third party model",token="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")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
50 |
notify_success(project["id"])
|
|
|
51 |
return {"processed": True}
|