diff --git a/python/examples/ocr/ocr_web_client.py b/python/examples/ocr/ocr_web_client.py index 6ae347a0705c5b0c3da2ea2b062375dd03a3087b..3d25e288dd93014cf9c3f84edc01d42c013ba2d9 100644 --- a/python/examples/ocr/ocr_web_client.py +++ b/python/examples/ocr/ocr_web_client.py @@ -20,11 +20,13 @@ import base64 import os, sys import time + def cv2_to_base64(image): #data = cv2.imencode('.jpg', image)[1] return base64.b64encode(image).decode( 'utf8') #data.tostring()).decode('utf8') + headers = {"Content-type": "application/json"} url = "http://127.0.0.1:9292/ocr/prediction" test_img_dir = "imgs/"