Views
No views yet
models/finetuned_webcam.pth (recommended): your fine-tuned PyTorch checkpoint for the ASL classifier.webcam_inference.py / api_server.py / train_finetune.py) uses:[0.485, 0.456, 0.406][0.229, 0.224, 0.225]A..Z<your-username> and <your-repo-name> with your Hugging Face repo:1from pathlib import Path
2import torch
3from huggingface_hub import hf_hub_download
4from asl_model import load_model_from_checkpoint
5
6REPO_ID = "<your-username>/<your-repo-name>"
7FILENAME = "models/finetuned_webcam.pth"
8
9device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
10ckpt_path = hf_hub_download(repo_id=REPO_ID, filename=FILENAME)
11
12model, meta = load_model_from_checkpoint(str(ckpt_path), device=device)
13print("Loaded checkpoint:", ckpt_path)models/finetuned_webcam.pth