Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -12,7 +12,6 @@ from huggingface_hub import (
|
|
12 |
Repository,
|
13 |
whoami,
|
14 |
)
|
15 |
-
from huggingface_hub.utils import HfHubHTTPError
|
16 |
import logging
|
17 |
from pathlib import Path
|
18 |
|
@@ -112,7 +111,7 @@ def create_space(api_token, space_name, owner, sdk, markdown_input):
|
|
112 |
private=False,
|
113 |
)
|
114 |
logger.info(f"Created Space: {repo_id}")
|
115 |
-
except
|
116 |
if "already exists" in str(e):
|
117 |
logger.info(f"Space {repo_id} already exists, proceeding to update.")
|
118 |
else:
|
|
|
12 |
Repository,
|
13 |
whoami,
|
14 |
)
|
|
|
15 |
import logging
|
16 |
from pathlib import Path
|
17 |
|
|
|
111 |
private=False,
|
112 |
)
|
113 |
logger.info(f"Created Space: {repo_id}")
|
114 |
+
except Exception as e:
|
115 |
if "already exists" in str(e):
|
116 |
logger.info(f"Space {repo_id} already exists, proceeding to update.")
|
117 |
else:
|