Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -10,7 +10,7 @@ class FixedDropout(tf.keras.layers.Layer):
|
|
10 |
self.rate = rate
|
11 |
|
12 |
def call(self, inputs, training=None):
|
13 |
-
return tf.keras.
|
14 |
|
15 |
# Load the TensorFlow model with custom layer handling
|
16 |
def load_model_with_custom_objects(model_path):
|
@@ -41,4 +41,4 @@ def classify_image(input_image):
|
|
41 |
input_image = gr.inputs.Image(shape=(224, 224, 3)) # Define the input image shape
|
42 |
output_label = gr.outputs.Label() # Define the output label
|
43 |
|
44 |
-
gr.Interface(fn=classify_image, inputs=input_image, outputs=output_label).launch()
|
|
|
10 |
self.rate = rate
|
11 |
|
12 |
def call(self, inputs, training=None):
|
13 |
+
return tf.keras.layers.Dropout(self.rate)(inputs, training=training)
|
14 |
|
15 |
# Load the TensorFlow model with custom layer handling
|
16 |
def load_model_with_custom_objects(model_path):
|
|
|
41 |
input_image = gr.inputs.Image(shape=(224, 224, 3)) # Define the input image shape
|
42 |
output_label = gr.outputs.Label() # Define the output label
|
43 |
|
44 |
+
gr.Interface(fn=classify_image, inputs=input_image, outputs=output_label).launch()
|