Update app.py
Browse files
app.py
CHANGED
@@ -8,19 +8,19 @@ import pandas as pd
|
|
8 |
from doctr.io import DocumentFile
|
9 |
from doctr.models import ocr_predictor
|
10 |
from PIL import Image, ImageDraw
|
11 |
-
path = r"
|
12 |
|
13 |
if os.path.exists('tp'):
|
14 |
-
img_temp = r"
|
15 |
else:
|
16 |
os.mkdir(os.path.join(path, "tp"))
|
17 |
-
img_temp = r"
|
18 |
|
19 |
if os.path.exists('tp1'):
|
20 |
-
sub_img_temp = r"
|
21 |
else:
|
22 |
os.mkdir(os.path.join(path, "tp1"))
|
23 |
-
sub_img_temp = r"
|
24 |
|
25 |
def load_model():
|
26 |
return ocr_predictor(
|
|
|
8 |
from doctr.io import DocumentFile
|
9 |
from doctr.models import ocr_predictor
|
10 |
from PIL import Image, ImageDraw
|
11 |
+
path = r"/ocr_vst"
|
12 |
|
13 |
if os.path.exists('tp'):
|
14 |
+
img_temp = r"/ocr_vst/tp"
|
15 |
else:
|
16 |
os.mkdir(os.path.join(path, "tp"))
|
17 |
+
img_temp = r"/ocr_vst/tp"
|
18 |
|
19 |
if os.path.exists('tp1'):
|
20 |
+
sub_img_temp = r"/ocr_vst/tp1"
|
21 |
else:
|
22 |
os.mkdir(os.path.join(path, "tp1"))
|
23 |
+
sub_img_temp = r"/ocr_vst/tp1"
|
24 |
|
25 |
def load_model():
|
26 |
return ocr_predictor(
|