ajitrajasekharan commited on
Commit
c5ff8d8
·
1 Parent(s): f1eee64

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -12,7 +12,7 @@ def load_image(image_file):
12
  def init_session_states():
13
  if 'disp' not in st.session_state:
14
  st.session_state['disp'] = st.empty()
15
- st.session_state['disp'].text("Setting up environment. This will take some time...")
16
  if 'init' not in st.session_state:
17
  st.session_state['init'] = 1
18
  os.system('pip install git+git://github.com/jaidedai/easyocr.git')
@@ -44,11 +44,12 @@ def main():
44
  st.write(file_details)
45
  image = load_image(uploaded_file)
46
  st.image(image,width=500)
47
- st.write("Detecting text bounding box...")
48
  reader = easyocr.Reader(['en'],gpu=True)
49
  bound = reader.readtext(image)
50
  st.write("Bounding box Detection complete")
51
  st.write(str(bound))
 
52
  text_recognition(image)
53
 
54
 
 
12
  def init_session_states():
13
  if 'disp' not in st.session_state:
14
  st.session_state['disp'] = st.empty()
15
+ st.session_state['disp'].text("Setting up environment with latest build installs. This will take about a minute...")
16
  if 'init' not in st.session_state:
17
  st.session_state['init'] = 1
18
  os.system('pip install git+git://github.com/jaidedai/easyocr.git')
 
44
  st.write(file_details)
45
  image = load_image(uploaded_file)
46
  st.image(image,width=500)
47
+ st.write("Detecting text bounding box and Take 1 recognition...")
48
  reader = easyocr.Reader(['en'],gpu=True)
49
  bound = reader.readtext(image)
50
  st.write("Bounding box Detection complete")
51
  st.write(str(bound))
52
+ st.write("Recognizing text - Take 2....")
53
  text_recognition(image)
54
 
55