paascorb commited on
Commit
7cdd8e4
1 Parent(s): f71bd31

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -8,7 +8,7 @@ learner = from_pretrained_fastai(repo_id)
8
 
9
  # Definimos una función que se encarga de llevar a cabo las predicciones
10
  def predict(img):
11
- img = PIL.Image.open('mapaches/test/images/raccoon-190.jpg')
12
  infer_tfms = tfms.A.Adapter([*tfms.A.resize_and_pad(size),tfms.A.Normalize()])
13
  pred_dict = models.ross.efficientdet.end2end_detect(img, infer_tfms, model.to("cpu"), class_map=class_map, detection_threshold=0.5)
14
  return pred_dict["img"]
 
8
 
9
  # Definimos una función que se encarga de llevar a cabo las predicciones
10
  def predict(img):
11
+ img = PIL.Image.open(img)
12
  infer_tfms = tfms.A.Adapter([*tfms.A.resize_and_pad(size),tfms.A.Normalize()])
13
  pred_dict = models.ross.efficientdet.end2end_detect(img, infer_tfms, model.to("cpu"), class_map=class_map, detection_threshold=0.5)
14
  return pred_dict["img"]