- in terminal
FLASK_APP=simpleClassifiler
- Enter simpleClassifier folder
- in terminal
flask run
- Open another terminal
- in another terminal
python test.py
result : {'class_id': 'n02504458', 'class_name': 'African_elephant'}
docker build -t alynlee/flask-example ./
docker run -it -p 5000:5000 alynlee/flask-example
- Open another terminal
- in another terminal
curl -X POST -F "file=@simpleClassifiler/img/elephant.jpeg" dockerIP:PORT/predict
result : { "class_id": "n02504458", "class_name": "African_elephant" }