Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -4,7 +4,7 @@ from tensorflow.keras.utils import CustomObjectScope
|
|
4 |
from tensorflow.keras.layers.experimental.preprocessing import RandomHeight
|
5 |
|
6 |
with CustomObjectScope({'RandomHeight': RandomHeight}):
|
7 |
-
model_0 = tf.keras.models.load_model('
|
8 |
|
9 |
def classify_image(inp):
|
10 |
inp = inp.reshape((-1, 224, 224, 3))
|
@@ -27,7 +27,7 @@ def classify_image(inp):
|
|
27 |
return output
|
28 |
|
29 |
|
30 |
-
image = gr.
|
31 |
|
32 |
gr.Interface(
|
33 |
fn=classify_image, inputs=image, outputs="text",live=True, theme="dark-peach",title="API de détection des images violentes",
|
|
|
4 |
from tensorflow.keras.layers.experimental.preprocessing import RandomHeight
|
5 |
|
6 |
with CustomObjectScope({'RandomHeight': RandomHeight}):
|
7 |
+
model_0 = tf.keras.models.load_model('/content/drive/MyDrive/bestmodel_porno_final_meilleure100%2.0.h5')
|
8 |
|
9 |
def classify_image(inp):
|
10 |
inp = inp.reshape((-1, 224, 224, 3))
|
|
|
27 |
return output
|
28 |
|
29 |
|
30 |
+
image = gr.Image(height=224, width=224)
|
31 |
|
32 |
gr.Interface(
|
33 |
fn=classify_image, inputs=image, outputs="text",live=True, theme="dark-peach",title="API de détection des images violentes",
|