WebashalarForML commited on
Commit
c9a0d37
·
verified ·
1 Parent(s): c105677

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -3
app.py CHANGED
@@ -9,15 +9,18 @@ from utils.model import train_model
9
  import zipfile
10
 
11
 
 
 
 
 
 
 
12
  os.umask(0o000)
13
 
14
  print("Current user:", os.getuid())
15
  print("Upload folder permissions:", os.stat(app.config['UPLOAD_FOLDER']).st_mode)
16
  print("Trying to save file:", file_path)
17
 
18
- app = Flask(__name__)
19
- app.secret_key = 'your_secret_key'
20
-
21
  # Folder paths
22
  app.config['UPLOAD_FOLDER'] = 'uploads'
23
  app.config['JSON_FOLDER'] = 'JSON'
@@ -30,6 +33,10 @@ os.makedirs(app.config['JSON_FOLDER'], exist_ok=True)
30
  os.makedirs(app.config['DATA_FOLDER'], exist_ok=True)
31
  os.makedirs(app.config['MODELS_FOLDER'], exist_ok=True)
32
 
 
 
 
 
33
  # Allowed file extensions
34
  ALLOWED_EXTENSIONS = {'pdf', 'docx', 'rsf', 'odt', 'png', 'jpg', 'jpeg', 'json'}
35
 
 
9
  import zipfile
10
 
11
 
12
+
13
+
14
+ app = Flask(__name__)
15
+ app.secret_key = 'your_secret_key'
16
+
17
+
18
  os.umask(0o000)
19
 
20
  print("Current user:", os.getuid())
21
  print("Upload folder permissions:", os.stat(app.config['UPLOAD_FOLDER']).st_mode)
22
  print("Trying to save file:", file_path)
23
 
 
 
 
24
  # Folder paths
25
  app.config['UPLOAD_FOLDER'] = 'uploads'
26
  app.config['JSON_FOLDER'] = 'JSON'
 
33
  os.makedirs(app.config['DATA_FOLDER'], exist_ok=True)
34
  os.makedirs(app.config['MODELS_FOLDER'], exist_ok=True)
35
 
36
+
37
+
38
+
39
+
40
  # Allowed file extensions
41
  ALLOWED_EXTENSIONS = {'pdf', 'docx', 'rsf', 'odt', 'png', 'jpg', 'jpeg', 'json'}
42