ZELEFACK commited on
Commit
3ebe350
1 Parent(s): 5cc125e
Files changed (1) hide show
  1. app.py +1 -3
app.py CHANGED
@@ -4,10 +4,8 @@ model_0 = tf.keras.models.load_model('bestmodel.h5')
4
  def classify_image(inp):
5
  inp = inp.reshape((-1, 224, 224, 3))
6
  prediction = model_0.predict(inp)
7
- print(prediction," ",prediction.argmax())
8
- print(prediction," ",prediction.argmax()," ",prediction[prediction.argmax()])
9
  output = ""
10
- if prediction[prediction.argmax()] < 0.7:
11
  output = "bonne image"
12
  elif prediction.argmax() == 0:
13
  output = "Rifle violence"
 
4
  def classify_image(inp):
5
  inp = inp.reshape((-1, 224, 224, 3))
6
  prediction = model_0.predict(inp)
 
 
7
  output = ""
8
+ if prediction[0][prediction.argmax()] < 0.7:
9
  output = "bonne image"
10
  elif prediction.argmax() == 0:
11
  output = "Rifle violence"