Spaces:
Sleeping
Sleeping
| import gradio as gr | |
| from ultralytics import YOLO | |
| import cv2 | |
| model = YOLO("https://huggingface.co/MiguelEscamilla/id-card-yolo/resolve/main/best.pt") | |
| def detect(image): | |
| results = model(image) | |
| return results[0].plot() | |
| demo = gr.Interface( | |
| fn=detect, | |
| inputs=gr.Image(type="filepath"), | |
| outputs="image" | |
| ) | |
| demo.launch() |