Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -4,17 +4,9 @@ import requests
|
|
| 4 |
import cv2
|
| 5 |
import numpy as np
|
| 6 |
|
| 7 |
-
#
|
| 8 |
-
|
| 9 |
-
|
| 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 |
|