ajitrajasekharan commited on
Commit
9c2f222
·
1 Parent(s): 44b3ae9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -2
app.py CHANGED
@@ -19,10 +19,12 @@ def init_session_states():
19
 
20
 
21
 
22
- init_session_states()
23
- import easyocr
24
 
25
  def main():
 
 
26
  st.session_state['disp'].text("Env setup up Complete")
27
  uploaded_file = st.file_uploader("Choose image file to detect text",type=['jpeg','jpg'])
28
  if uploaded_file is not None:
@@ -30,9 +32,11 @@ def main():
30
  st.write(file_details)
31
  image = load_image(uploaded_file)
32
  st.image(image,width=250)
 
33
  reader = easyocr.Reader(['en'],gpu=True)
34
  bound = reader.readtext(image)
35
  st.write(str(bound))
 
36
 
37
 
38
 
 
19
 
20
 
21
 
22
+
23
+
24
 
25
  def main():
26
+ init_session_states()
27
+ import easyocr
28
  st.session_state['disp'].text("Env setup up Complete")
29
  uploaded_file = st.file_uploader("Choose image file to detect text",type=['jpeg','jpg'])
30
  if uploaded_file is not None:
 
32
  st.write(file_details)
33
  image = load_image(uploaded_file)
34
  st.image(image,width=250)
35
+ st.session_state['disp'].text("Detecting text....")
36
  reader = easyocr.Reader(['en'],gpu=True)
37
  bound = reader.readtext(image)
38
  st.write(str(bound))
39
+ st.session_state['disp'].text("Detection complete")
40
 
41
 
42