Spaces:
Sleeping
Sleeping
| # upload_space.py - Upload code to HuggingFace Space (excluding large model files) | |
| from huggingface_hub import upload_folder | |
| import os | |
| print("Uploading ElephMind API to HuggingFace Space...") | |
| print("(Model will be downloaded from Hub at runtime)") | |
| # Determine the server directory (where this script lives) | |
| server_dir = os.path.dirname(os.path.abspath(__file__)) | |
| print(f"Uploading directory: {server_dir}") | |
| upload_folder( | |
| folder_path=server_dir, | |
| repo_id="issoufzousko07/elephmind-api", | |
| repo_type="space", | |
| ignore_patterns=["models/*", "*.pyc", "__pycache__", "*.db", "storage/*", "data_storage/*", ".env", "venv", ".git", ".idea"] | |
| ) | |
| print("[OK] Upload complete!") | |
| print("Your Space should start building at: https://huggingface.co/spaces/issoufzousko07/elephmind-api") | |