frncscp commited on
Commit
faae2ad
·
1 Parent(s): fd96b98

Update pages/Entorno de Ejecución.py

Browse files
Files changed (1) hide show
  1. pages/Entorno de Ejecución.py +1 -1
pages/Entorno de Ejecución.py CHANGED
@@ -27,7 +27,7 @@ def predict(_model_list, _weights, _img):
27
  img = cv2.resize(_img, (IMAGE_WIDTH, IMAGE_HEIGHT))
28
  for model, weight in zip(_model_list, _weights):
29
  y_gorrito += tf.cast(model(tf.expand_dims(img/255., 0)), dtype=tf.float32)*weight
30
- return [y_gorrito / sum(weights), raw_img]
31
 
32
  def preprocess(file_uploader, module = 'cv2'): #makes the uploaded image readable
33
  img = np.frombuffer(uploaded_file.read(), np.uint8)
 
27
  img = cv2.resize(_img, (IMAGE_WIDTH, IMAGE_HEIGHT))
28
  for model, weight in zip(_model_list, _weights):
29
  y_gorrito += tf.cast(model(tf.expand_dims(img/255., 0)), dtype=tf.float32)*weight
30
+ return [y_gorrito / sum(_weights), raw_img]
31
 
32
  def preprocess(file_uploader, module = 'cv2'): #makes the uploaded image readable
33
  img = np.frombuffer(uploaded_file.read(), np.uint8)