Spaces:
Running
Running
fix spaces import
Browse files
app.py
CHANGED
|
@@ -7189,9 +7189,9 @@ def check_hf_space_url(url: str) -> Tuple[bool, str | None, str | None]:
|
|
| 7189 |
"""Check if URL is a valid Hugging Face Spaces URL and extract username/project"""
|
| 7190 |
import re
|
| 7191 |
|
| 7192 |
-
# Pattern to match HF Spaces URLs
|
| 7193 |
url_pattern = re.compile(
|
| 7194 |
-
r'^(https?://)?(huggingface\.co|hf\.co)/spaces/([\w
|
| 7195 |
re.IGNORECASE
|
| 7196 |
)
|
| 7197 |
|
|
|
|
| 7189 |
"""Check if URL is a valid Hugging Face Spaces URL and extract username/project"""
|
| 7190 |
import re
|
| 7191 |
|
| 7192 |
+
# Pattern to match HF Spaces URLs (allows dots in space names)
|
| 7193 |
url_pattern = re.compile(
|
| 7194 |
+
r'^(https?://)?(huggingface\.co|hf\.co)/spaces/([\w.-]+)/([\w.-]+)$',
|
| 7195 |
re.IGNORECASE
|
| 7196 |
)
|
| 7197 |
|