Android digit classifier that works with a python http server
- Clone the repo, import project in android studio, build and run on your phone or emulator.
- Open
pythonScripts
folder and runserver.py
by using commandpython server.py PORT_NUMBER
. ReplacePORT_NUMBER
by some feasible port number, say8800
. - run
ngrok.exe
and use commandngrok http PORT_NUMBER
. ReplacePORT_NUMBER
by same port number used in step 2. - Inside the app set URL same as the one you receive in step 3, something like
http://abcdefgh.ngrok.io
. - Capture an Image using the
SELECT
button, and then useSEND
button to send the image as aPOST
request to the python server and receive final image as aGET
request.
POST image Forward Forward
`Andoroid App` -------------> `ngrok server` -------------> `python server` -------------> `perform recognition`
^ | ^ | ^ |
|__________________________| |_______________________| |_____________________________|
GET image Forward Write final image