edesaras commited on
Commit
8ebf841
1 Parent(s): 39012a1

feed pil image to the yolo predict

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -23,7 +23,7 @@ if uploaded_file is not None:
23
  st.write("Detecting...")
24
 
25
  # Perform inference
26
- results = model.predict(uploaded_file)
27
  r = results[0]
28
  im_bgr = r.plot(conf=False, pil=True, font_size=48, line_width=3) # Returns a PIL image if pil=True
29
  im_rgb = Image.fromarray(im_bgr[..., ::-1]) # Convert BGR to RGB
 
23
  st.write("Detecting...")
24
 
25
  # Perform inference
26
+ results = model.predict(image)
27
  r = results[0]
28
  im_bgr = r.plot(conf=False, pil=True, font_size=48, line_width=3) # Returns a PIL image if pil=True
29
  im_rgb = Image.fromarray(im_bgr[..., ::-1]) # Convert BGR to RGB