|
@@ -21,6 +21,8 @@ app.config.from_object(
|
|
|
)
|
|
|
cache = Cache(app, config={"CACHE_TYPE": "SimpleCache"})
|
|
|
|
|
|
+ocr = PaddleOCR(use_angle_cls=True, lang='en')
|
|
|
+
|
|
|
app.config['SESSION_COOKIE_SECURE'] = True
|
|
|
app.config['SESSION_COOKIE_HTTPONLY'] = True
|
|
|
app.config['SESSION_COOKIE_SAMESITE'] = 'Lax'
|
|
@@ -167,7 +169,6 @@ def OCRupload():
|
|
|
|
|
|
file = request.files['image']
|
|
|
try:
|
|
|
- ocr = PaddleOCR(use_angle_cls=True, lang='en')
|
|
|
image = Image.open(file.stream)
|
|
|
image_np = np.array(image)
|
|
|
result = ocr.ocr(image_np)
|