Spaces:
Build error
Build error
Update app.py
Browse files8 unmodified lines910111213141516178 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)model = torch.hub.load('ultralytics/yolov5', 'custom', path='yolov5/runs/train/exp/weights/best.pt', trust_repo=True)# Global variables to store images and labels for carousel functionality8 unmodified lines910111213141516178 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 from the uploaded best.pt filemodel = torch.hub.load('ultralytics/yolov5', 'custom', path='best.pt', trust_repo=True)# Global variables to store images and labels for carousel functionality
app.py+2-2