Update app.py
Browse files
app.py
CHANGED
|
@@ -45,7 +45,7 @@ import requests
|
|
| 45 |
import cv2
|
| 46 |
import numpy as np
|
| 47 |
import pytesseract
|
| 48 |
-
|
| 49 |
#pytesseract.pytesseract.tesseract_cmd = r"./Tesseract-OCR/tesseract.exe"
|
| 50 |
from PIL import Image
|
| 51 |
@st.experimental_singleton
|
|
@@ -135,7 +135,7 @@ def main():
|
|
| 135 |
img = img.save("img.png")
|
| 136 |
img = cv2.imread("img.png")
|
| 137 |
# get co-ordinates to crop the image
|
| 138 |
-
image, lc = mark_region(img)
|
| 139 |
c = lc[1]
|
| 140 |
# cropping image img = image[y0:y1, x0:x1]
|
| 141 |
img = image[c[0][1]:c[1][1], c[0][0]:c[1][0]]
|
|
|
|
| 45 |
import cv2
|
| 46 |
import numpy as np
|
| 47 |
import pytesseract
|
| 48 |
+
import line_cor
|
| 49 |
#pytesseract.pytesseract.tesseract_cmd = r"./Tesseract-OCR/tesseract.exe"
|
| 50 |
from PIL import Image
|
| 51 |
@st.experimental_singleton
|
|
|
|
| 135 |
img = img.save("img.png")
|
| 136 |
img = cv2.imread("img.png")
|
| 137 |
# get co-ordinates to crop the image
|
| 138 |
+
image, lc = line_cor.mark_region(img)
|
| 139 |
c = lc[1]
|
| 140 |
# cropping image img = image[y0:y1, x0:x1]
|
| 141 |
img = image[c[0][1]:c[1][1], c[0][0]:c[1][0]]
|