Spaces:
Runtime error
Runtime error
import gradio as gr | |
from PIL import Image | |
import cv2 | |
import torch | |
import numpy as np | |
if __name__ == '__main__': | |
model = torch.hub.load('ultralytics/yolov5', 'custom', path='myYOLO/best.pt', force_reload=True) | |
main() | |
demo_app = gr.Interface( | |
fn=yolov5_inference, | |
inputs=inputs, | |
outputs=outputs, | |
title=title, | |
examples=examples, | |
cache_examples=True, | |
live=True, | |
theme='huggingface', | |
) | |
demo_app.launch(debug=True, enable_queue=True) |