Eladlev commited on
Commit
9b60d66
·
verified ·
1 Parent(s): 4311882

Upload app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -0
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