Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
@@ -6,8 +6,9 @@ from ultralytics.yolo.v8.detect import predict
|
|
6 |
import gradio as gr
|
7 |
#model = Yolov4(weight_path="yolov4.weights", class_name_path='coco_classes.txt')
|
8 |
def gradio_wrapper(img):
|
9 |
-
predict(model="YOLOv8-real-time/ultralytics/yolo/v8/detect/yolov8x6.pt", source=img)
|
10 |
#print(np.shape(img))
|
|
|
11 |
demo = gr.Interface(
|
12 |
gradio_wrapper,
|
13 |
#gr.Image(source="webcam", streaming=True, flip=True),
|
|
|
6 |
import gradio as gr
|
7 |
#model = Yolov4(weight_path="yolov4.weights", class_name_path='coco_classes.txt')
|
8 |
def gradio_wrapper(img):
|
9 |
+
result = predict(model="YOLOv8-real-time/ultralytics/yolo/v8/detect/yolov8x6.pt", source=img)
|
10 |
#print(np.shape(img))
|
11 |
+
return result
|
12 |
demo = gr.Interface(
|
13 |
gradio_wrapper,
|
14 |
#gr.Image(source="webcam", streaming=True, flip=True),
|