ref:PaddleHub-源于产业实践的开源深度学习平台https://www.paddlepaddle.org.cn/hub
# coding=utf-8
from wsgiref.simple_server import make_server
from flask import Flask
from flask import request
import paddlehub as hub
import cv2
import json
ocr = hub.Module(name="chinese_ocr_db_crnn_server")
app = Flask(__name__)
@app.route("/paddle-ocr")
def paddleOcrR():
path = request.args.get('path', '')
if path != '':
return getPaddleText(path)
else:
return '[]'
def