card2 / create_hf_space.py
d-e-e-k-11's picture
Upload folder using huggingface_hub
08d6be3 verified
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}")