Download create_space.py from FincH12/Automation_Threads_EU: direct link, hf CLI and curl.
- Browser
- Download file 416 Bytes
-
https://huggingface.co/spaces/FincH12/Automation_Threads_EU/resolve/main/create_space.py
- Command line
-
hf download hf://spaces/FincH12/Automation_Threads_EU/create_space.py
-
curl -L -o create_space.py https://huggingface.co/spaces/FincH12/Automation_Threads_EU/resolve/main/create_space.py
416 Bytes
| import os | |
| from huggingface_hub import HfApi | |
| api = HfApi() | |
| new_space_id = "FincH12/Automation_Threads_EU" | |
| print(f"Creating Space {new_space_id}...") | |
| try: | |
| api.create_repo( | |
| repo_id=new_space_id, | |
| repo_type="space", | |
| space_sdk="docker", | |
| private=False | |
| ) | |
| print("Space created successfully.") | |
| except Exception as e: | |
| print(f"Failed to create space (maybe it exists?): {e}") | |