Spaces:
Sleeping
Sleeping
Upload app.py
Browse files
app.py
CHANGED
|
@@ -14,6 +14,8 @@ system = """<SYSTEM_CAPABILITY>
|
|
| 14 |
</SYSTEM_CAPABILITY>"""
|
| 15 |
|
| 16 |
def save_image_or_get_url(image, filename="processed_image.png"):
|
|
|
|
|
|
|
| 17 |
filepath = os.path.join("static", filename)
|
| 18 |
image.save(filepath)
|
| 19 |
return filepath
|
|
|
|
| 14 |
</SYSTEM_CAPABILITY>"""
|
| 15 |
|
| 16 |
def save_image_or_get_url(image, filename="processed_image.png"):
|
| 17 |
+
if not os.path.isdir("static"):
|
| 18 |
+
os.mkdir("static")
|
| 19 |
filepath = os.path.join("static", filename)
|
| 20 |
image.save(filepath)
|
| 21 |
return filepath
|