Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -69,7 +69,9 @@ def upload_gitRepository():
|
|
69 |
|
70 |
# Check if the file already exists in the repository
|
71 |
existing_files = api.list_repo_files(repo_id=HF_SPACE_NAME, repo_type='space')
|
|
|
72 |
target_path = f"{REPOSITORY_DIRECTORY}/{filename}"
|
|
|
73 |
|
74 |
if target_path in existing_files:
|
75 |
print(f"File '{target_path}' already exists in the repository. Skipping upload...")
|
|
|
69 |
|
70 |
# Check if the file already exists in the repository
|
71 |
existing_files = api.list_repo_files(repo_id=HF_SPACE_NAME, repo_type='space')
|
72 |
+
print("Existing files:", existing_files) # Debug print statement
|
73 |
target_path = f"{REPOSITORY_DIRECTORY}/{filename}"
|
74 |
+
print("Constructed target path:", target_path) # Debug print statement
|
75 |
|
76 |
if target_path in existing_files:
|
77 |
print(f"File '{target_path}' already exists in the repository. Skipping upload...")
|