s4s-editor-beta / upload.py
soiz1's picture
Update upload.py
4f1ce0d verified
raw
history blame
539 Bytes
from huggingface_hub import HfApi
import os
api = HfApi(token=os.environ["sc4sc_token"])
# Step 1: ๆ˜Ž็คบ็š„ใซ Space ใ‚’ไฝœๆˆ
api.create_repo(
repo_id="sc4sc/editor",
repo_type="space",
space_sdk="docker", # gradio, streamlit, docker, static ใฎใ„ใšใ‚Œใ‹
private=False,
exist_ok=True
)
# Step 2: ใƒ‡ใƒผใ‚ฟใฎใ‚ขใƒƒใƒ—ใƒญใƒผใƒ‰
api.upload_large_folder(
folder_path=".",
repo_id="sc4sc/editor",
repo_type="space",
allow_patterns="**/*"
)
print("โœ… Large folder upload completed successfully.")