ZELEFACK commited on
Commit
f8ecbb9
·
verified ·
1 Parent(s): 5d6d6db

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
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('bestmodel.h5')
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.inputs.Image(shape=(224, 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",
 
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",