kevinconka commited on
Commit
d44f6a3
·
1 Parent(s): 1203db2

Refactor inference function in app.py to accept image directly instead of file path, simplifying the input process.

Browse files
Files changed (1) hide show
  1. app.py +1 -2
app.py CHANGED
@@ -53,9 +53,8 @@ model.hor_conf_thresh = 0.1
53
 
54
 
55
  # @spaces.GPU
56
- def inference(image_fp):
57
  """Run inference on image and return annotated image."""
58
- image = imread(image_fp)
59
  results = model(image)
60
  return results.draw(image)
61
 
 
53
 
54
 
55
  # @spaces.GPU
56
+ def inference(image):
57
  """Run inference on image and return annotated image."""
 
58
  results = model(image)
59
  return results.draw(image)
60