Spaces:
Build error
Build error
File size: 534 Bytes
ce11694 68148c4 ce11694 68148c4 ce11694 5437fbc ce11694 799e5e1 ce11694 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
import tensorflow as tf
import cv2
import numpy as np
from glob import glob
#from models import Yolov4
import gradio as gr
#model = Yolov4(weight_path="yolov4.weights", class_name_path='coco_classes.txt')
def gradio_wrapper(img):
%cd ultralytics/yolo/v8/detect/
!python predict.py model=yolov8x6.pt source=img
#print(np.shape(img))
demo = gr.Interface(
gradio_wrapper,
#gr.Image(source="webcam", streaming=True, flip=True),
gr.Image(source="webcam", streaming=True),
"image",
live=True
)
demo.launch() |