amosfang commited on
Commit
1668d94
1 Parent(s): 1286788

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -39,7 +39,7 @@ def load_model():
39
 
40
  def predict(image_np):
41
 
42
- detection_model = load_model()
43
  results = detection_model(image_np)
44
 
45
  # different object detection models have additional results
@@ -65,6 +65,7 @@ def predict(image_np):
65
  return result_pil_img
66
 
67
 
 
68
  # pil_image = Image.open(image_path)
69
  # image_arr = pil_image_as_numpy_array(pil_image)
70
 
 
39
 
40
  def predict(image_np):
41
 
42
+ image_np = pil_image_as_numpy_array(image_np)
43
  results = detection_model(image_np)
44
 
45
  # different object detection models have additional results
 
65
  return result_pil_img
66
 
67
 
68
+ detection_model = load_model()
69
  # pil_image = Image.open(image_path)
70
  # image_arr = pil_image_as_numpy_array(pil_image)
71