oscarfu0501 commited on
Commit
ba28244
1 Parent(s): e158268

Update handler.py

Browse files
Files changed (1) hide show
  1. handler.py +2 -2
handler.py CHANGED
@@ -72,11 +72,11 @@ class EndpointHandler:
72
  clothes = img[y1: y2, x1: x2]
73
  clothes = cv2.cvtColor(clothes, cv2.COLOR_BGR2RGB)
74
  retval , buffer = cv2.imencode('.jpg', clothes)
75
- im_bytes = buffer.tobytes()
76
 
77
  # cv2.imwrite("result.jpg", clothes)
78
  # create base 64 object
79
- jpg_as_text = base64.b64encode(im_bytes).decode("utf-8") # Decode bytes to string")
80
  # base64_encoded = base64.b64encode(image_bytes).decode("utf-8")
81
 
82
  # Get the image format
 
72
  clothes = img[y1: y2, x1: x2]
73
  clothes = cv2.cvtColor(clothes, cv2.COLOR_BGR2RGB)
74
  retval , buffer = cv2.imencode('.jpg', clothes)
75
+ # im_bytes = buffer.tobytes()
76
 
77
  # cv2.imwrite("result.jpg", clothes)
78
  # create base 64 object
79
+ jpg_as_text = base64.b64encode(buffer).decode("utf-8") # Decode bytes to string")
80
  # base64_encoded = base64.b64encode(image_bytes).decode("utf-8")
81
 
82
  # Get the image format