0x90e commited on
Commit
01d839a
·
1 Parent(s): b43e10d

Test creating folders.

Browse files
Files changed (1) hide show
  1. app.py +6 -1
app.py CHANGED
@@ -15,8 +15,13 @@ def run_cmd(command):
15
 
16
  def inference(img):
17
  _id = randint(1, 10000)
18
- #INPUT_DIR = "/tmp/input_image" + str(_id) + "/"
19
  OUTPUT_DIR = "/tmp/output_image" + str(_id) + "/"
 
 
 
 
 
20
  img.save(OUTPUT_DIR + "1.jpg", "JPEG")
21
  return os.path.join(OUTPUT_DIR, "1_out.jpg")
22
 
 
15
 
16
  def inference(img):
17
  _id = randint(1, 10000)
18
+ INPUT_DIR = "/tmp/input_image" + str(_id) + "/"
19
  OUTPUT_DIR = "/tmp/output_image" + str(_id) + "/"
20
+ run_cmd("rm -rf " + INPUT_DIR)
21
+ run_cmd("rm -rf " + OUTPUT_DIR)
22
+ run_cmd("mkdir " + INPUT_DIR)
23
+ run_cmd("mkdir " + OUTPUT_DIR)
24
+
25
  img.save(OUTPUT_DIR + "1.jpg", "JPEG")
26
  return os.path.join(OUTPUT_DIR, "1_out.jpg")
27