Spaces:
Sleeping
Sleeping
File size: 523 Bytes
42d74a1 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | import os
from huggingface_hub import HfApi
token = open("hf_token").read().strip()
api = HfApi(token=token)
repo_id = "Hodfa71/RetailMind"
print(f"Creating Space: {repo_id}")
api.create_repo(repo_id=repo_id, repo_type="space", space_sdk="gradio", exist_ok=True)
print("Uploading files...")
api.upload_folder(
folder_path=".",
repo_id=repo_id,
repo_type="space",
allow_patterns=["*.py", "*.txt", "*.md", "modules/**/*.py", "tests/**/*.py"]
)
print(f"Deployed to https://huggingface.co/spaces/{repo_id}")
|