Spaces:
Runtime error
Runtime error
fix
Browse files- 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
|
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
|