from gevent import pywsgi
from flask import Flask
app = Flask(__name__)
@app.route("/")
def helloworld():
return '<h1>Hello World!</h1>'
@app.route("/upload")
def upload():
return 'upload success'
@app.route("/face_detect")
def instance():
return 'succeed!'
if __name__ == '__main__':
server = pywsgi.WSGIServer(('127.0.0.1', 5000), app)
server.serve_forever()
作者:艾孜尔江