Update app.py
Browse files
app.py
CHANGED
@@ -19,8 +19,7 @@ def classify_text(text):
|
|
19 |
uploaded_file = st.file_uploader("Upload Image", type= ['png', 'jpeg', 'jpg'])
|
20 |
|
21 |
if uploaded_file is not None:
|
22 |
-
|
23 |
-
print(type(uploaded_file))
|
24 |
ocr_list = [x for x in pytesseract.image_to_string(uploaded_file).split("\n") if x != '']
|
25 |
ocr_class = [classify_text(x) for x in ocr_list]
|
26 |
idx = []
|
|
|
19 |
uploaded_file = st.file_uploader("Upload Image", type= ['png', 'jpeg', 'jpg'])
|
20 |
|
21 |
if uploaded_file is not None:
|
22 |
+
img = Image.open(uploaded_file)
|
|
|
23 |
ocr_list = [x for x in pytesseract.image_to_string(uploaded_file).split("\n") if x != '']
|
24 |
ocr_class = [classify_text(x) for x in ocr_list]
|
25 |
idx = []
|