CoolFace
Apppublic

evoneural/evoneuralIn3D-app

sourceHugging Faceapache-2.0updated 8mo agoView on Hugging Face
0likes
upload_to_hf.py55 linesDownload Raw Back to scripts
1"""2Upload evoneural code and config to Hugging Face (no weights/outputs).3Run from project root: python -m scripts.upload_to_hf4 5Requires: pip install huggingface_hub, and HF token (huggingface-cli login or HF_TOKEN).6"""7from pathlib import Path8 9REPO_ID = "evoneural/evoneuralIn3D"10ROOT = Path(__file__).resolve().parent.parent11 12# Same exclusions as .huggingfaceignore so only code/config are uploaded13IGNORE_PATTERNS = [14    ".venv/*",15    "venv/*",16    "env/*",17    "__pycache__/*",18    "*.pyc",19    "outputs/*",20    "weights/*",21    "*.obj",22    "*.glb",23    "*.png",24    "TripoSR/*",25    "*.ckpt",26    "*.safetensors",27    "*.bin",28    ".idea/*",29    ".vscode/*",30    ".streamlit/*",31    "*.log",32    "performance_log.txt",33    ".git/*",34]35 36 37def main() -> None:38    from huggingface_hub import HfApi39 40    api = HfApi()41    # Create repo if it doesn't exist (needs write token)42    api.create_repo(repo_id=REPO_ID, repo_type="model", exist_ok=True)43    print(f"Uploading to {REPO_ID} (code and config only)...")44    api.upload_folder(45        folder_path=str(ROOT),46        repo_id=REPO_ID,47        repo_type="model",48        ignore_patterns=IGNORE_PATTERNS,49    )50    print(f"Done. See https://huggingface.co/{REPO_ID}")51 52 53if __name__ == "__main__":54    main()55