Sa-m commited on
Commit
814d854
1 Parent(s): 6b5b43a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -18,11 +18,11 @@ def load_model():
18
  model.line_thickness=6
19
  return model
20
 
 
21
  #, force_reload=True
22
  def detect(inp):
23
  #g = (size / max(inp.size)) # gain
24
- #im = im.resize((int(x * g) for x in im.size), Image.ANTIALIAS) # resize
25
- model=load_model()
26
  results = model(inp,size=640) # inference
27
  results.render() # updates results.imgs with boxes and labels
28
  return Image.fromarray(results.imgs[0])
 
18
  model.line_thickness=6
19
  return model
20
 
21
+ model=load_model()
22
  #, force_reload=True
23
  def detect(inp):
24
  #g = (size / max(inp.size)) # gain
25
+ #im = im.resize((int(x * g) for x in im.size), Image.ANTIALIAS) # resize
 
26
  results = model(inp,size=640) # inference
27
  results.render() # updates results.imgs with boxes and labels
28
  return Image.fromarray(results.imgs[0])