#!/usr/bin/env python3 """ FINAL UPLOAD SCRIPT - Run this after authentication Repository: megharudushi/Sheikh """ import os from huggingface_hub import HfApi, create_repo, upload_folder def final_upload(): """Upload the complete Bengali AI model""" print("šŸ‡§šŸ‡© FINAL BANGLI AI UPLOAD") print("=" * 35) # Initialize API api = HfApi() try: # Check authentication user = api.whoami() print(f"āœ… Authenticated as: {user['name']}") # Repository details repo_id = "megharudushi/Sheikh" local_dir = "./ready_bengali_ai" # Verify files files = os.listdir(local_dir) print(f"šŸ“ Found {len(files)} files to upload:") for file in sorted(files): size = os.path.getsize(f"{local_dir}/{file}") / (1024*1024) print(f" šŸ“„ {file} ({size:.1f}MB)") # Create repository print(f"\nšŸ”— Creating/Accessing repository: {repo_id}") repo_url = create_repo( repo_id=repo_id, exist_ok=True, repo_type="model" ) print(f"āœ… Repository ready!") # Upload everything print(f"\nšŸ“¤ Uploading model to Hugging Face...") upload_folder( folder_path=local_dir, repo_id=repo_id, commit_message="Complete Bengali AI model - 355M parameters with full tokenizer" ) print("\nšŸŽ‰ SUCCESS! Model uploaded!") print(f"🌐 View at: https://huggingface.co/{repo_id}") print(f"šŸ“¦ Model ready for use by anyone!") return True except Exception as e: print(f"āŒ Upload failed: {e}") return False if __name__ == "__main__": # Run upload success = final_upload() if success: print("\n" + "="*50) print("šŸŽŠ CONGRATULATIONS!") print("Your Bengali AI model is now live on Hugging Face!") print("Repository: https://huggingface.co/megharudushi/Sheikh") print("Anyone can now use your model with:") print("```python") print("from transformers import AutoTokenizer, AutoModelForCausalLM") print('tokenizer = AutoTokenizer.from_pretrained("megharudushi/Sheikh")') print('model = AutoModelForCausalLM.from_pretrained("megharudushi/Sheikh")') print("```") print("="*50) else: print("\nšŸ”§ Please check authentication and try again.")