Other
PyTorch
Transformers
English
wheels
python3.10
cuda
machine-learning
deep-learning
dependency-management
Instructions to use RDHub/pytorch_python_310 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use RDHub/pytorch_python_310 with Transformers:
# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("RDHub/pytorch_python_310", device_map="auto") - Notebooks
- Google Colab
- Kaggle
| #!/usr/bin/env python3 | |
| """ | |
| Upload PyTorch wheel collection to HuggingFace | |
| Usage: HF_TOKEN=your_token python upload_to_hf.py | |
| """ | |
| import os | |
| from huggingface_hub import HfApi | |
| def upload_to_huggingface(): | |
| # Get token from environment variable | |
| token = os.getenv("HF_TOKEN") | |
| if not token: | |
| print("โ Error: HF_TOKEN environment variable not set") | |
| print("Usage: HF_TOKEN=your_token python upload_to_hf.py") | |
| return False | |
| # Set up API with token | |
| api = HfApi(token=token) | |
| # Repository details | |
| repo_id = "RDHub/pytorch_python_310" | |
| folder_path = "/media/acleda/DATA/code/ai-engineer/khmer-nlp/pytorch_python_310" | |
| print(f"Uploading folder: {folder_path}") | |
| print(f"To repository: {repo_id}") | |
| print("This may take a while due to large file sizes...") | |
| try: | |
| # Upload the entire folder | |
| api.upload_folder( | |
| folder_path=folder_path, | |
| repo_id=repo_id, | |
| repo_type="model", | |
| ) | |
| print("โ Upload completed successfully!") | |
| print(f"Repository available at: https://huggingface.co/{repo_id}") | |
| except Exception as e: | |
| print(f"โ Upload failed: {e}") | |
| return False | |
| return True | |
| if __name__ == "__main__": | |
| success = upload_to_huggingface() | |
| if success: | |
| print("\n๐ PyTorch wheel collection is now available on HuggingFace!") | |
| print("Users can now install with:") | |
| print("git clone https://huggingface.co/RDHub/pytorch_python_310") | |
| print("cd pytorch_python_310 && pip install lib_wheel/*.whl") | |
| else: | |
| print("\nโ Upload failed. Please check the error messages above.") |