good / example_usage.py
callidus's picture
Upload folder using huggingface_hub
54b8ba7 verified
raw
history blame contribute delete
542 Bytes
# Example: Load and Use the Model
import torch
import json
from huggingface_hub import hf_hub_download
# Your repository ID
repo_id = "YOUR_USERNAME/YOUR_REPO_NAME" # Update this!
# Download files
config_path = hf_hub_download(repo_id=repo_id, filename="model_config.json")
weights_path = hf_hub_download(repo_id=repo_id, filename="model_weights.pt")
tokenizer_path = hf_hub_download(repo_id=repo_id, filename="tokenizer.json")
print("Files downloaded successfully!")
# Load and use your model
# (Add your TransformerModel class here)