flask_pytorch icon indicating copy to clipboard operation
flask_pytorch copied to clipboard

using flask to run pytorch model

flask_pytorch

using flask to run pytorch model

start server

python3 app.py

you will see a result like this

flask

Submitting requests to pytorch server

python3 request_sample.py -f='file_path'

send a image like this

send_image

you will see a result like this (I use the mnist image as example).

image

the demo model can de download in baiduyun

demo online

After starting the server, use http://127.0.0.1:5000/demo for online testing

online testing

Acknowledgement

This repository refers to deploy-pytorch-model, and thank the author again.