pnicewiczoig commited on
Commit
b6b7afa
·
unverified ·
1 Parent(s): 40ea18e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -25,7 +25,7 @@ if image is not None:
25
  input_image = Image.open(image) #read image
26
  st.image(input_image) #display image
27
 
28
- with st.spinner("🤖 AI is at Work! "):
29
 
30
 
31
  result = reader.readtext(np.array(input_image))
@@ -34,7 +34,9 @@ if image is not None:
34
 
35
 
36
  for text in result:
37
- result_text.append(text[1])
 
 
38
 
39
  st.write(result_text)
40
  st.balloons()
 
25
  input_image = Image.open(image) #read image
26
  st.image(input_image) #display image
27
 
28
+ with st.spinner("Please wait ... processing"):
29
 
30
 
31
  result = reader.readtext(np.array(input_image))
 
34
 
35
 
36
  for text in result:
37
+ # only output if numbers and spaces
38
+ if re.match("^[0-9 ]+$", text[1]):
39
+ result_text.append(text[1])
40
 
41
  st.write(result_text)
42
  st.balloons()