We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 147aa59 commit 035330eCopy full SHA for 035330e
flask_server/app.py
@@ -7,14 +7,15 @@
7
8
app = Flask(__name__)
9
_VERSION = 1
10
-@app.route('/v{}/ocr'.format(version), methods=["POST"])
+
11
+@app.route('/v{}/ocr'.format(_VERSION), methods=["POST"])
12
def ocr():
13
try:
14
url = request.form['image_url']
15
output = process_image(url)
16
return jsonify({"output": output})
17
except KeyError:
- return jsonify({"error": "Did you mean to send data formatted: '{"image_url": "some_url"}'")
18
+ return jsonify({"error": "Did you mean to send data formatted: {'image_url': 'some_url'}"})
19
20
21
@app.errorhandler(500)
0 commit comments