Dricz commited on
Commit
0f1cc0a
·
verified ·
1 Parent(s): b0e1d53

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -30,8 +30,9 @@ def image_preprocess(image):
30
  model = YOLO('best (1).pt')
31
 
32
  def response(image):
33
- res = image_preprocess(image)
34
  im_rgb = model(res)
 
35
  return im_rgb
36
 
37
  iface = gr.Interface(fn=response, inputs="image", outputs="image")
 
30
  model = YOLO('best (1).pt')
31
 
32
  def response(image):
33
+ res = Image.open(image)
34
  im_rgb = model(res)
35
+ im_rgb = Image.fromarray(im_rgb)
36
  return im_rgb
37
 
38
  iface = gr.Interface(fn=response, inputs="image", outputs="image")