Comments (5)
Solved it by downgrading h5py to 2.10.0
from androidflask.
Hi,
You are right.
A quick solution is to edit the next line from the flask_server.py script (https://github.com/ahmedfgad/AndroidFlask/blob/master/Part%202/FlaskServer/flask_server.py):
imagefile = flask.request.files['image']
The new line should use image0 rather than image as the key.
imagefile = flask.request.files['image0']
This will allow you to upload only a single image from the client to the server. I will update the project later to support multiplt image upload.
Please let me know if there still any issue.
from androidflask.
Thanks a lot buddy. Now im getting this error. I selected a different Image from my mobile. The images which you have provided for the digits are not getting selected for uplaod and I get the error - "Something went wrong"..Hence I tried with a random image, but then getting this error
File "/home/ubuntu/Downloads/AndroidFlask-master/Part 2/FlaskServer/flask_server.py", line 17, in handle_request
img = img.reshape(784)
ValueError: cannot reshape array of size 2332800 into shape (784,)
from androidflask.
Note that the project expects a MNIST image of shape 28x28. I think you selected an image of different shape.
from androidflask.
Thanks Ahmad I tried copying the mnist example images in screenshot directory only then I was able to upload them.
But now getting this different error :-)
File "/home/ubuntu/Downloads/AndroidFlask-master/Part 2/FlaskServer/flask_server.py", line 18, in handle_request
loaded_model = keras.models.load_model('model.h5')
File "/home/ubuntu/.local/lib/python3.6/site-packages/keras/models.py", line 269, in load_model
model_config = json.loads(model_config.decode('utf-8'))
AttributeError: 'str' object has no attribute 'decode'
from androidflask.
Related Issues (6)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from androidflask.