Spaces:
Build error
Build error
Update app.py
Browse files8 unmodified lines9101112121314141516178 unmodified lines# Clear the torch hub cache to prevent any previous corrupted downloadsshutil.rmtree(torch.hub._get_torch_home(), ignore_errors=True)
# Load the YOLOv5 model (ensure the path is correct)# Load the YOLOv5 model from the uploaded best.pt filemodel = torch.hub.load( 'ultralytics/yolov5', 'custom', path='yolov5/runs/train/exp/weights/best.pt', trust_repo=True 'ultralytics/yolov5', 'custom', path='best.pt', trust_repo=True)
# Global variables to store images and labels for carousel functionalityapp.py+2-2