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

Update pages/Entorno de Ejecución.py

Browse files
Files changed (1) hide show
  1. pages/Entorno de Ejecución.py +3 -3
pages/Entorno de Ejecución.py CHANGED
@@ -23,9 +23,9 @@ cnn, vit, zero_shot, autoencoder, svm, iforest, gan = st.tabs(["CNN", "ViT", "Ze
23
  @st.experimental_singleton
24
  def predict(_model_list, _weights, _img):
25
  y_gorrito = 0
26
- raw_img = cv2.cvtColor(img, cv2.COLOR_BGR2RGB)
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
 
 
23
  @st.experimental_singleton
24
  def predict(_model_list, _weights, _img):
25
  y_gorrito = 0
26
+ raw_img = cv2.cvtColor(_img, cv2.COLOR_BGR2RGB)
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