Wauplin HF staff commited on
Commit
a0f6a59
1 Parent(s): ee2d982
Files changed (1) hide show
  1. open_pr.py +1 -1
open_pr.py CHANGED
@@ -51,7 +51,7 @@ def open_pr(space_id_or_url: str, oauth_token: gr.OAuthToken | None) -> str:
51
 
52
  api = HfApi(token=token)
53
 
54
- if not space_id:
55
  raise gr.Error("You must input a Space ID or URL.")
56
  space_id = (
57
  RepoUrl(space_id_or_url).repo_id if "https://huggingface.co/spaces/" in space_id_or_url else space_id_or_url
 
51
 
52
  api = HfApi(token=token)
53
 
54
+ if not space_id_or_url:
55
  raise gr.Error("You must input a Space ID or URL.")
56
  space_id = (
57
  RepoUrl(space_id_or_url).repo_id if "https://huggingface.co/spaces/" in space_id_or_url else space_id_or_url