ferferefer commited on
Commit
6b1ec43
1 Parent(s): c766b96
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -7,6 +7,7 @@ from tensorflow.keras.models import load_model
7
  from tensorflow.keras.preprocessing.image import load_img
8
  from tensorflow.keras.preprocessing.image import img_to_array
9
  from keras.models import Model
 
10
  import numpy as np
11
  from huggingface_hub import hf_hub_url, cached_download
12
 
@@ -15,7 +16,7 @@ model = EfficientNetV2B0(include_top = False,input_shape=img_shape)
15
  flat_1=GlobalAveragePooling2D()(model.output)
16
  capa_3 = Dense(1,activation='sigmoid')(flat_1)
17
  model = Model(inputs=model.inputs,outputs = capa_3)
18
- model.compile(optimizer=tensorflow.keras.optimizers.Adam(learning_rate=1e-4),loss="BinaryCrossentropy", metrics=["accuracy"])
19
  #Subir los pesos del modelo
20
  repo_id = "ferferefer/RIM_ONE_Glaucoma"
21
  filename = "vgg_rim_checkpoint.h5" # o el path a tu SavedModel
 
7
  from tensorflow.keras.preprocessing.image import load_img
8
  from tensorflow.keras.preprocessing.image import img_to_array
9
  from keras.models import Model
10
+ from tensorflow.keras.optimizers import Adam
11
  import numpy as np
12
  from huggingface_hub import hf_hub_url, cached_download
13
 
 
16
  flat_1=GlobalAveragePooling2D()(model.output)
17
  capa_3 = Dense(1,activation='sigmoid')(flat_1)
18
  model = Model(inputs=model.inputs,outputs = capa_3)
19
+ model.compile(optimizer=Adam(learning_rate=1e-4),loss="BinaryCrossentropy", metrics=["accuracy"])
20
  #Subir los pesos del modelo
21
  repo_id = "ferferefer/RIM_ONE_Glaucoma"
22
  filename = "vgg_rim_checkpoint.h5" # o el path a tu SavedModel