HarshKapadia2 / one-or-two

A hand gesture model web app to detect 1 and 2 in a picture.
https://one-or-two.herokuapp.com/
MIT License
5 stars 4 forks source link

Internal Server Error on using PNG files #10

Closed pratik-choudhari closed 4 years ago

pratik-choudhari commented 4 years ago

500 Internal Server Error in /predict when a PNG file is uploaded.

pratik-choudhari commented 4 years ago

Reason: PNG files have shape (n, m, 4) whereas in model.py reshape dimensions are (224, 224, 3) Solution: modify image = Image.open(pic_path) in model.py to image = Image.open(pic_path).convert('RGB')

HarshKapadia2 commented 4 years ago

Hey @pratik-choudhari, thank you so much for raising the issue and following up on it! Would you be interested in making a PR to resolve that?

pratik-choudhari commented 4 years ago

Sure!