Spaces:
Build error
Build error
Update app.py
Browse files3 unmodified lines456789101112133 unmodified linesimport osimport zipfileimport io# Load the YOLOv5 model (ensure the path is correct)model = torch.hub.load('ultralytics/yolov5', 'custom', path='yolov5/runs/train/exp/weights/best.pt')# Global variables to store images and labels for carousel functionality3 unmodified lines45678910111213141516173 unmodified linesimport osimport zipfileimport ioimport shutil# 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 functionality
app.py+5-1