gahanmakwana commited on
Commit
79b6aab
·
1 Parent(s): 44154a0

Fixed file upload and OCR functionality

Browse files
Files changed (3) hide show
  1. app.py +3 -1
  2. require.txt +0 -10
  3. requirements.txt +10 -0
app.py CHANGED
@@ -42,4 +42,6 @@ def uploaded_file(filename):
42
  return send_from_directory(app.config['UPLOAD_FOLDER'], filename)
43
 
44
  if __name__ == '__main__':
45
- app.run(host='0.0.0.0', port=5000)
 
 
 
42
  return send_from_directory(app.config['UPLOAD_FOLDER'], filename)
43
 
44
  if __name__ == '__main__':
45
+ port = int(os.environ.get('PORT', 5000)) # <-- IMPORTANT
46
+ app.run(host='0.0.0.0', port=port)
47
+
require.txt DELETED
@@ -1,10 +0,0 @@
1
- shapely==2.1.0
2
- scikit-image==0.18.3
3
- imgaug==0.4.0
4
- pyclipper
5
- lmdb
6
- tqdm
7
- numpy
8
- visualdl
9
- python-Levenshtein
10
- opencv-contrib-python==4.5.5.62
 
 
 
 
 
 
 
 
 
 
 
requirements.txt CHANGED
@@ -1,3 +1,13 @@
1
  flask
2
  paddleocr
3
  paddlepaddle
 
 
 
 
 
 
 
 
 
 
 
1
  flask
2
  paddleocr
3
  paddlepaddle
4
+ shapely==2.1.0
5
+ scikit-image==0.18.3
6
+ imgaug==0.4.0
7
+ pyclipper
8
+ lmdb
9
+ tqdm
10
+ numpy
11
+ visualdl
12
+ python-Levenshtein
13
+ opencv-contrib-python==4.5.5.62