[SOLVED] Trying to deploy IMDB on Render

SOLVED: Was returning objects using StringIO and not the actual text to be classified.

Hello all, I’m having trouble deploying a model on Render. Similar to the teddy bear classifier except that I’m trying to deploy the IMDB classifier to Render. I’m getting a weird error where it’s always predicting the same thing:

Result = (Category neg, tensor(0), tensor([0.5722, 0.4278]))

No matter what you type in.

Code can be found here:

Live version here:
https://sentiment-classifier-restart2.onrender.com/

Edit: Forgot to include Render logs

3 Likes

Hey Raymond,
I only had a brief look but in server.py:
prediction = learn.predict(img)

Shouldn’t you be using the textField key from the data variable and not the img here?

I hadn’t changed the variable names from the teddy bear. I solved it though.

1 Like

Nice, yeah I had a go and it works nice.

Good job!

1 Like