Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -123,7 +123,7 @@ def create_hf_space():
|
|
123 |
|
124 |
# Verify repository existence before uploading
|
125 |
try:
|
126 |
-
repo_exists =
|
127 |
if not repo_exists:
|
128 |
return jsonify({"error": f"Repository {full_repo_id} does not exist after creation attempt."}), 500
|
129 |
logger.info(f"Verified repository exists: {full_repo_id}")
|
|
|
123 |
|
124 |
# Verify repository existence before uploading
|
125 |
try:
|
126 |
+
repo_exists = api.repo_exists(repo_id=full_repo_id, repo_type="space")
|
127 |
if not repo_exists:
|
128 |
return jsonify({"error": f"Repository {full_repo_id} does not exist after creation attempt."}), 500
|
129 |
logger.info(f"Verified repository exists: {full_repo_id}")
|