File size: 564 Bytes
0c830e5
 
 
94b29b4
b101525
5137c86
 
 
 
0c830e5
78ea23b
507a536
9214c84
 
 
0fab17f
 
94b29b4
 
 
4352add
27e3c48
0c830e5
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import PIL 
from PIL import ImageDraw
import streamlit as st
import easyocr

def load_image(image_file):
	img = PIL.Image.open(image_file)
	return img



uploaded_file = st.file_uploader("Upload Files",type=['png','jpeg','jpg'])
if uploaded_file is not None:
    file_details = {"FileName":uploaded_file.name,"FileType":uploaded_file.type,"FileSize":uploaded_file.size}
    st.write(file_details)
    img = load_image(uploaded_file)
    st.image(img,width=250)
    reader = easyocr.Reader(['en'])
    bound = reader.readtext(img)
    st.write(str(bound))