| import os | |
| from huggingface_hub import HfApi | |
| # --- CONFIGURATION --- | |
| REPO_ID = "FinancialReports/jina-v3-financial-classifier" | |
| # "." means "upload the current directory" | |
| LOCAL_FOLDER = "." | |
| def main(): | |
| print(f"π Starting upload to {REPO_ID}...") | |
| api = HfApi() | |
| # Upload everything in the current folder | |
| api.upload_folder( | |
| folder_path=LOCAL_FOLDER, | |
| repo_id=REPO_ID, | |
| repo_type="model", | |
| commit_message="Final Release: Hybrid Jina-XGBoost Model", | |
| ignore_patterns=["upload_to_hf.py", ".git", ".gitattributes"] # Don't upload the script itself or git files | |
| ) | |
| print("β Upload Complete! Check your model here:") | |
| print(f"https://huggingface.co/{REPO_ID}") | |
| if __name__ == "__main__": | |
| main() | |