Spaces:
Build error
Build error
Update src/api/nto_api.py
Browse files- src/api/nto_api.py +3 -5
src/api/nto_api.py
CHANGED
|
@@ -132,12 +132,10 @@ async def clothing_try_on(image: UploadFile = File(...),
|
|
| 132 |
}
|
| 133 |
|
| 134 |
output = replicate_run_cto(input)
|
| 135 |
-
print(output)
|
| 136 |
-
print("Output0",output[0])
|
| 137 |
-
image_base = str(output[0])
|
| 138 |
|
| 139 |
-
|
| 140 |
-
|
|
|
|
| 141 |
|
| 142 |
output_image = Image.open(BytesIO(image_data)).resize(actual_image.size)
|
| 143 |
output_image = np.bitwise_and(
|
|
|
|
| 132 |
}
|
| 133 |
|
| 134 |
output = replicate_run_cto(input)
|
|
|
|
|
|
|
|
|
|
| 135 |
|
| 136 |
+
response = requests.get(output[0])
|
| 137 |
+
|
| 138 |
+
image_data = base64.b64encode(response.content).decode('utf-8')
|
| 139 |
|
| 140 |
output_image = Image.open(BytesIO(image_data)).resize(actual_image.size)
|
| 141 |
output_image = np.bitwise_and(
|