def ocr(): if not request.json or not 'image_url' in request.json: abort(400) text = image_string(request.json['image_url']) return jsonify({'output': text})
def ocr_almond(): almonds = image_string('https://butterflyofdream.files.wordpress.com/2013/05/ocr-sample2.png') return jsonify({'output': almonds})