akhaliq HF Staff commited on
Commit
1ad254f
·
1 Parent(s): e4efb6a

fix spaces import

Browse files
Files changed (1) hide show
  1. app.py +2 -2
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-]+)/([\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