WebashalarForML commited on
Commit
0a03a56
·
verified ·
1 Parent(s): 688e0d7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -1
app.py CHANGED
@@ -18,12 +18,15 @@ logging.basicConfig(
18
  app = Flask(__name__)
19
  app.secret_key = 'your_secret_key'
20
  app.config['UPLOAD_FOLDER'] = 'uploads/'
21
- app.config['RESULT_FOLDER'] = 'uploads/'
 
22
 
23
  UPLOAD_FOLDER = 'static/uploads/'
24
  RESULT_FOLDER = 'static/results/'
 
25
  os.makedirs(UPLOAD_FOLDER, exist_ok=True)
26
  os.makedirs(RESULT_FOLDER, exist_ok=True)
 
27
 
28
  if not os.path.exists(app.config['UPLOAD_FOLDER']):
29
  os.makedirs(app.config['UPLOAD_FOLDER'])
@@ -31,6 +34,9 @@ if not os.path.exists(app.config['UPLOAD_FOLDER']):
31
  if not os.path.exists(app.config['RESULT_FOLDER']):
32
  os.makedirs(app.config['RESULT_FOLDER'])
33
 
 
 
 
34
  # Set the PaddleOCR home directory to a writable location
35
  os.environ['PADDLEOCR_HOME'] = '/tmp/.paddleocr'
36
 
 
18
  app = Flask(__name__)
19
  app.secret_key = 'your_secret_key'
20
  app.config['UPLOAD_FOLDER'] = 'uploads/'
21
+ app.config['RESULT_FOLDER'] = 'results/'
22
+ app.config['JSON_FOLDER'] = 'json/'
23
 
24
  UPLOAD_FOLDER = 'static/uploads/'
25
  RESULT_FOLDER = 'static/results/'
26
+ JSON_FOLDER = 'static/json/'
27
  os.makedirs(UPLOAD_FOLDER, exist_ok=True)
28
  os.makedirs(RESULT_FOLDER, exist_ok=True)
29
+ os.makedirs(JSON_FOLDER, exist_ok=True)
30
 
31
  if not os.path.exists(app.config['UPLOAD_FOLDER']):
32
  os.makedirs(app.config['UPLOAD_FOLDER'])
 
34
  if not os.path.exists(app.config['RESULT_FOLDER']):
35
  os.makedirs(app.config['RESULT_FOLDER'])
36
 
37
+ if not os.path.exists(app.config['JSON_FOLDER']):
38
+ os.makedirs(app.config['JSON_FOLDER'])
39
+
40
  # Set the PaddleOCR home directory to a writable location
41
  os.environ['PADDLEOCR_HOME'] = '/tmp/.paddleocr'
42