Update app.py
Browse files
app.py
CHANGED
@@ -8,19 +8,9 @@ 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"./master/ocr_vst/"
|
12 |
|
13 |
-
|
14 |
-
|
15 |
-
else:
|
16 |
-
os.mkdir(os.path.join(path, "tp"))
|
17 |
-
img_temp = os.path.join(path, "tp")
|
18 |
-
|
19 |
-
if os.path.exists('tp1'):
|
20 |
-
sub_img_temp = os.path.join(path, "tp1")
|
21 |
-
else:
|
22 |
-
os.mkdir(os.path.join(path, "tp1"))
|
23 |
-
sub_img_temp = os.path.join(path, "tp1")
|
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 |
|
12 |
+
img_temp = "tp"
|
13 |
+
sub_img_temp = "tp1"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
14 |
|
15 |
def load_model():
|
16 |
return ocr_predictor(
|