DHEIVER commited on
Commit
6a96309
·
1 Parent(s): 1a65837

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -11
app.py CHANGED
@@ -4,17 +4,9 @@ import requests
4
  import cv2
5
  import numpy as np
6
 
7
- # Define a custom layer 'FixedDropout'
8
- def fixed_dropout(x):
9
- return tf.keras.layers.Dropout(0.5)(x)
10
-
11
- # Function to register custom layers within a custom_object_scope
12
- def register_custom_layers():
13
- return tf.keras.utils.custom_object_scope({'FixedDropout': fixed_dropout})
14
-
15
- # Load the TensorFlow model within the custom_object_scope
16
- with register_custom_layers():
17
- tf_model = tf.keras.models.load_model('modelo_treinado.h5')
18
 
19
  class_labels = ["Normal", "Cataract"]
20
 
 
4
  import cv2
5
  import numpy as np
6
 
7
+ # Load the TensorFlow model
8
+ tf_model_path = 'modelo_treinado.h5' # Update with the path to your TensorFlow model
9
+ tf_model = tf.keras.models.load_model(tf_model_path)
 
 
 
 
 
 
 
 
10
 
11
  class_labels = ["Normal", "Cataract"]
12