mamechin's picture
Upload 28 files
3ac7250
raw
history blame
529 Bytes
from hubconf import custom
model = custom(path_or_model='best.pt') # custom example
# model = create(name='yolov7', pretrained=True, channels=3, classes=80, autoshape=True) # pretrained example
# Verify inference
import numpy as np
from PIL import Image
import gradio as gr
# imgs = [np.zeros((640, 480, 3))]
# imgs = 'inference/images/meal.jpg'
# results = model(imgs) # batched inference
# results.print()
# results.save()
gr.Interface(inputs=["image"],outputs=["image"],fn=lambda img:model(img).render()[0]).launch()