From f38a670861637e96a2913495aaf126d8dad43e3b Mon Sep 17 00:00:00 2001 From: satrio142 <106372451+satrio142@users.noreply.github.com> Date: Wed, 29 May 2024 20:10:11 +0700 Subject: [PATCH] Update app.py --- app.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app.py b/app.py index b477475..9cad1ec 100644 --- a/app.py +++ b/app.py @@ -39,7 +39,7 @@ async def predict_image(img: UploadFile, response: Response): image = np.expand_dims(image, axis=0) # Predict the class of the image - prediction = model.predict([img_array, np.zeros((1, 150, 150, 3))])[0] + prediction = model.predict([image, np.zeros((1, 150, 150, 3))])[0] confidence = np.max(prediction) print(f"Predictions: {prediction}, Confidence: {confidence}") # Debugging output predicted_class_index = np.argmax(prediction)