Skip to content

Commit

Permalink
Update app.py
Browse files Browse the repository at this point in the history
  • Loading branch information
satrio142 committed May 29, 2024
1 parent 40c0d6d commit f38a670
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit f38a670

Please sign in to comment.