Download create_hf_space.py from d-e-e-k-11/card2: direct link, hf CLI and curl.
- Browser
- Download file 404 Bytes
-
https://huggingface.co/d-e-e-k-11/card2/resolve/main/create_hf_space.py
- Command line
-
hf download hf://d-e-e-k-11/card2/create_hf_space.py
-
curl -L -o create_hf_space.py https://huggingface.co/d-e-e-k-11/card2/resolve/main/create_hf_space.py
404 Bytes
| from huggingface_hub import HfApi, create_repo | |
| api = HfApi() | |
| repo_id = "d-e-e-k-11/credit-card-fraud-detection" | |
| try: | |
| create_repo( | |
| repo_id=repo_id, | |
| repo_type="space", | |
| space_sdk="docker", | |
| private=False | |
| ) | |
| print(f"Space created successfully: https://huggingface.co/spaces/{repo_id}") | |
| except Exception as e: | |
| print(f"Error creating space: {e}") | |