Pavan2k4 commited on
Commit
2a71a66
·
verified ·
1 Parent(s): 39c353e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -0
app.py CHANGED
@@ -73,8 +73,13 @@ MASK_DIR = os.path.join(base,"Masks")
73
  CSV_LOG_PATH = "image_log.csv"
74
 
75
  # Create directories
 
 
 
 
76
  for directory in [UPLOAD_DIR, MASK_DIR]:
77
  os.makedirs(directory, exist_ok=True)
 
78
 
79
 
80
 
 
73
  CSV_LOG_PATH = "image_log.csv"
74
 
75
  # Create directories
76
+ def set_read_write_permissions(path):
77
+ os.chmod(path, stat.S_IRUSR | stat.S_IWUSR | stat.S_IRGRP | stat.S_IWGRP | stat.S_IROTH | stat.S_IWOTH)
78
+
79
+ # Create directories with read and write permissions
80
  for directory in [UPLOAD_DIR, MASK_DIR]:
81
  os.makedirs(directory, exist_ok=True)
82
+ set_read_write_permissions(directory)
83
 
84
 
85