Hello,
I’ve just completed lesson 2, and I’ve built a pizza classifier (just two classes, though): https://github.com/dbudhrani/capricciosa-o-diavola.
I’m trying to deploy it using Simon Willison’s solution (https://github.com/simonw/cougar-or-not) expanded with this Heroku deployment tutorial (https://github.com/nikhilno1/healthy-or-not/blob/master/heroku-deploy.md).
I’ve reached the point of building and deploying. However, for some reason, checking the logs it seems that it’s downloading the resnet34 weights on every single request. I don’t understand it, though, as it’s not part of the endpoint implementation. This is causing two issues: 1) causes the app to go on timeout, making it useless. I haven’t managed to effectively use the web app. 2) Takes up memory a lot of memory (I’ve managed to decrease the slug size to 303MB (thanks to this solution: Hosting a simple web application) - this was necessary, considering that the hard limit is 500MB. However, it increases in runtime up to 803MB.
I’d be really glad if anyone could help me out
Finally, I’m making an attempt with Heroku after trying to use PythonAnywhere (they don’t support Starlette) and ZEIT NOW (there’s a size limit. If I remember correctly, about 50MB. My model weighs around 83MB). I know they offer a paid solution that allows more space, but I was looking for a free (or cheap) solution just to get started.
Thanks in advance,
Dhanesh