Spaces:
Runtime error
Runtime error
File size: 402 Bytes
979c7a7 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
from huggingface_hub import HfApi
import os
# Initialize the Hugging Face API client
api = HfApi()
# Create a new Space
space_name = "language-detection-api"
api.create_repo(
repo_id=space_name,
repo_type="space",
space_sdk="docker",
private=False
)
print(f"Space created successfully: https://huggingface.co./spaces/{os.getenv('HUGGING_FACE_HUB_TOKEN').split('/')[0]}/{space_name}")
|