igmarco commited on
Commit
bdcbe45
1 Parent(s): a8cf2ba

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -25,7 +25,9 @@ def transform_image(image):
25
 
26
  # Definimos una función que se encarga de llevar a cabo las predicciones
27
  def predict(img):
28
- image = transforms.Resize((480,640))(img)
 
 
29
  tensor = transform_image(image=image)
30
 
31
  model.to(device)
 
25
 
26
  # Definimos una función que se encarga de llevar a cabo las predicciones
27
  def predict(img):
28
+ img_pil = PIL.Image.fromarray(img, 'RGB')
29
+
30
+ image = transforms.Resize((480,640))(img_pil)
31
  tensor = transform_image(image=image)
32
 
33
  model.to(device)