Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Float32 is not json serializable #13

Open
RiteshKSingh1709 opened this issue Feb 12, 2020 · 2 comments
Open

Float32 is not json serializable #13

RiteshKSingh1709 opened this issue Feb 12, 2020 · 2 comments

Comments

@RiteshKSingh1709
Copy link

RiteshKSingh1709 commented Feb 12, 2020

Hi @kamalkraj , Nice work , but one thing while using the api.py and curl to get the prediction i got error
float32 is not json serializable.

@alexkohan
Copy link

alexkohan commented Feb 25, 2020

I solved that by changing the line 16 in api.py

from this:

`return`` jsonify({"result":out})`

to this:

`return jsonify({"result":str(out)})`

Hope it will help you.

@RiteshKSingh1709
Copy link
Author

Hi @alexkohan ,

Nice , But already there is one pull request is open for this . and wrapping the output in str will not give proper json I believe.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants