alok94 commited on
Commit
c706b03
·
1 Parent(s): 57035da

button issue fixed

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -40,7 +40,7 @@ uploaded_img= st.file_uploader("Browse File", type=['jpeg','jpg','png'],accept_m
40
  #container2=st.empty()
41
 
42
  def on_click():
43
- if uploaded_img and btn:
44
  pipeline = keras_ocr.pipeline.Pipeline()
45
  print(uploaded_img.name)
46
  images = [
@@ -56,7 +56,8 @@ def on_click():
56
 
57
  columnbelow[0].pyplot(fig)
58
  print(images)
59
- if uploaded_img:
 
60
  btn=st.button("Recognize Text", on_click=on_click)
61
 
62
  belowrecognize=st.empty()
 
40
  #container2=st.empty()
41
 
42
  def on_click():
43
+ if uploaded_img is not None:
44
  pipeline = keras_ocr.pipeline.Pipeline()
45
  print(uploaded_img.name)
46
  images = [
 
56
 
57
  columnbelow[0].pyplot(fig)
58
  print(images)
59
+
60
+ if uploaded_img is not None:
61
  btn=st.button("Recognize Text", on_click=on_click)
62
 
63
  belowrecognize=st.empty()