LapStore
commited on
Commit
•
6e57d33
1
Parent(s):
de3d8a9
try space
Browse files
app.py
CHANGED
@@ -32,11 +32,11 @@ async def predict(supported_types_str: str = Form(),age: str = Form() , file: U
|
|
32 |
processed_image = image.convert("L")
|
33 |
|
34 |
# Save the processed image to a temporary file
|
35 |
-
output_file_path = "tmp_processed_image.png"
|
36 |
processed_image.save(output_file_path)
|
37 |
|
38 |
# Return the processed image for download
|
39 |
-
return FileResponse(output_file_path, media_type='image/png', filename="tmp_processed_image.png")
|
40 |
|
41 |
|
42 |
|
|
|
32 |
processed_image = image.convert("L")
|
33 |
|
34 |
# Save the processed image to a temporary file
|
35 |
+
output_file_path = "/tmp/tmp_processed_image.png"
|
36 |
processed_image.save(output_file_path)
|
37 |
|
38 |
# Return the processed image for download
|
39 |
+
return FileResponse(output_file_path, media_type='image/png', filename="/tmp/tmp_processed_image.png")
|
40 |
|
41 |
|
42 |
|