| #!/usr/bin/env python3 | |
| ''' | |
| Upload LiMp Pipeline Integration System to HuggingFace Hub | |
| ========================================================= | |
| ''' | |
| import os | |
| from huggingface_hub import HfApi, Repository | |
| from pathlib import Path | |
| def upload_to_huggingface(): | |
| """Upload the LiMp system to HuggingFace Hub.""" | |
| # Initialize HuggingFace API | |
| api = HfApi() | |
| # Repository details | |
| repo_id = "9x25dillon/LiMp-Pipeline-Integration-System" | |
| local_dir = "." | |
| print(f"🚀 Uploading LiMp Pipeline Integration System to HuggingFace Hub...") | |
| print(f"Repository: {repo_id}") | |
| try: | |
| # Create repository if it doesn't exist | |
| api.create_repo( | |
| repo_id=repo_id, | |
| exist_ok=True, | |
| private=False, | |
| repo_type="model" | |
| ) | |
| print(f"✅ Repository created/verified: {repo_id}") | |
| # Upload all files | |
| api.upload_folder( | |
| folder_path=local_dir, | |
| repo_id=repo_id, | |
| commit_message="Initial upload of LiMp Pipeline Integration System", | |
| ignore_patterns=[ | |
| "*.pyc", | |
| "__pycache__/", | |
| ".git/", | |
| ".gitignore", | |
| "*.log", | |
| "*.tmp" | |
| ] | |
| ) | |
| print(f"🎉 Successfully uploaded to HuggingFace Hub!") | |
| print(f"🔗 Repository URL: https://huggingface.co/{repo_id}") | |
| except Exception as e: | |
| print(f"❌ Upload failed: {e}") | |
| print("Make sure you're logged in with: huggingface-cli login") | |
| if __name__ == "__main__": | |
| upload_to_huggingface() | |