Spaces:
Build error
Build error
Commit ·
e4777e1
1
Parent(s): 736ef53
feat: switch to latest model
Browse filesFiles changed (2)
- app.py+2-3
- latest.pt → local_latest.ptRenamed+2-2
1 unmodified line23456789101112131415161 unmodified lineimport torchfrom PIL import Imageimport numpy as npfrom huggingface_hub import hf_hub_downloadimport cv2# Download the model from Hugging Face Hubmodel_path = hf_hub_download(repo_id='ethandavey/yoloV5-coursework-model', filename='model.pt')# Load the YOLOv5 modelmodel = torch.hub.load('ultralytics/yolov5', 'custom', path=model_path, source='github')model.line_thickness = 3 # Set the thickness of the bounding box lines# Print model class names1 unmodified line234567891011121314151 unmodified lineimport torchfrom PIL import Imageimport numpy as npimport cv2# Download the model from Hugging Face Hubmodel_path = 'local_latest.pt'# Load the YOLOv5 modelmodel = torch.hub.load('ultralytics/yolov5', 'custom', path=model_path, source='local')model.line_thickness = 3 # Set the thickness of the bounding box lines# Print model class names
123version https://git-lfs.github.com/spec/v1oid sha256:a02b20ec782cc8e78cd37c1b1126505d6537c9017d62e2b81ca468920c2efd21size 14346792123version https://git-lfs.github.com/spec/v1oid sha256:56ffacbde772706c45eef26d0cd72b21f3d28e5e383c8d0945bd0ac283fc8b6dsize 14346728
app.py+2-3
latest.pt → local_latest.ptRenamed+2-2