Sa-m commited on
Commit
f657c16
1 Parent(s): 7ed43db

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -0
app.py CHANGED
@@ -15,6 +15,7 @@ model.hide_conf=True
15
  def detect(inp):
16
  #g = (size / max(inp.size)) # gain
17
  #im = im.resize((int(x * g) for x in im.size), Image.ANTIALIAS) # resize
 
18
  results = model(inp,size=640) # inference
19
  results.render() # updates results.imgs with boxes and labels
20
  return Image.fromarray(results.imgs[0])
 
15
  def detect(inp):
16
  #g = (size / max(inp.size)) # gain
17
  #im = im.resize((int(x * g) for x in im.size), Image.ANTIALIAS) # resize
18
+ inp=Image.open(inp)
19
  results = model(inp,size=640) # inference
20
  results.render() # updates results.imgs with boxes and labels
21
  return Image.fromarray(results.imgs[0])