princeml commited on
Commit
ce56873
·
1 Parent(s): 5e7d88c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -19,8 +19,9 @@ model = YOLO("best.pt") # load a custom model
19
  def gradio_wrapper(img):
20
  global model
21
  #print(np.shape(img))
22
- results = model(img,show = True) # predict on an image
23
- return results[0]
 
24
  demo = gr.Interface(
25
  gradio_wrapper,
26
  #gr.Image(source="webcam", streaming=True, flip=True),
 
19
  def gradio_wrapper(img):
20
  global model
21
  #print(np.shape(img))
22
+ results = model.predict(img) # predict on an image
23
+
24
+ return cv2.cvtColor(img, cv2.COLOR_BGR2RGB)
25
  demo = gr.Interface(
26
  gradio_wrapper,
27
  #gr.Image(source="webcam", streaming=True, flip=True),