WenmuZhou / flask_pytorch

using flask to run pytorch model

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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.

About

using flask to run pytorch model


Languages

Language:Python 67.3%Language:HTML 32.7%