ferferefer commited on
Commit
9a307c6
1 Parent(s): 29c305a
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -1,11 +1,11 @@
1
 
2
  import streamlit as st
3
  import tensorflow as tf
4
- from tf.keras.applications import EfficientNetV2B0
5
  from keras.layers import Flatten,Dense,Dropout,GlobalAveragePooling2D
6
- from tf.keras.models import load_model
7
- from tf.keras.preprocessing.image import load_img
8
- from tf.keras.preprocessing.image import img_to_array
9
  from keras.models import Model
10
  from transformers import pipeline
11
  import numpy as np
@@ -16,7 +16,7 @@ model = EfficientNetV2B0(include_top = False,input_shape=img_shape)
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=tf.keras.optimizers.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
 
1
 
2
  import streamlit as st
3
  import tensorflow as tf
4
+ from tensorflow.keras.applications import EfficientNetV2B0
5
  from keras.layers import Flatten,Dense,Dropout,GlobalAveragePooling2D
6
+ 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
  from transformers import pipeline
11
  import numpy as np
 
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=tensorflow.keras.optimizers.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