crazyai-kby
commited on
Commit
·
49716b1
1
Parent(s):
a2e72c5
Debug
Browse files
app.py
CHANGED
@@ -16,15 +16,17 @@ def run(file):
|
|
16 |
|
17 |
backend_url = os.getenv('BACKEND_URL')
|
18 |
url = f'{backend_url}/raster-to-vector-base64'
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
|
|
|
|
28 |
|
29 |
return out_img, out_json
|
30 |
|
|
|
16 |
|
17 |
backend_url = os.getenv('BACKEND_URL')
|
18 |
url = f'{backend_url}/raster-to-vector-base64'
|
19 |
+
out_json = {'json': url}
|
20 |
+
out_img = in_image
|
21 |
+
# payload = {'image': base64_img}
|
22 |
+
# image_request = requests.post(url, json=payload)
|
23 |
+
#
|
24 |
+
# out_img = image_request.json()['image']
|
25 |
+
# out_json = image_request.json()['graph']
|
26 |
+
#
|
27 |
+
# decode_img = base64.b64decode(out_img.split(',')[1])
|
28 |
+
# decode_img = np.frombuffer(decode_img, dtype=np.uint8)
|
29 |
+
# out_img = cv2.imdecode(decode_img, flags=cv2.IMREAD_COLOR)
|
30 |
|
31 |
return out_img, out_json
|
32 |
|