优化flask接口
This commit is contained in:
@@ -56,7 +56,7 @@ def get_book_areas(image):
|
||||
@retry(stop=stop_after_attempt(3), wait=wait_random(1, 3), reraise=True,
|
||||
after=lambda x: logging.warning("获取文档区域失败!"))
|
||||
def request_book_areas(image):
|
||||
url = "http://det_api:5000/det/detect_books"
|
||||
url = "http://det_api:5000/det/books"
|
||||
_, encoded_image = cv2.imencode('.jpg', image)
|
||||
byte_stream = encoded_image.tobytes()
|
||||
files = {"image": ("image.jpg", byte_stream)}
|
||||
|
||||
Reference in New Issue
Block a user