adrianpierce commited on
Commit
2575900
1 Parent(s): 64646c8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -1
app.py CHANGED
@@ -1,10 +1,14 @@
1
  import streamlit as st
2
  import pytesseract
3
  from io import StringIO
 
4
 
5
  uploaded_file = st.file_uploader("Choose a file")
6
  if uploaded_file is not None:
 
7
 
8
- extractedInformation = pytesseract.image_to_string(uploaded_file)
 
 
9
  st.write(extractedInformation)
10
 
 
1
  import streamlit as st
2
  import pytesseract
3
  from io import StringIO
4
+ from PIL import Image
5
 
6
  uploaded_file = st.file_uploader("Choose a file")
7
  if uploaded_file is not None:
8
+
9
 
10
+ image = Image.open(uploaded_file)
11
+ st.image(image, caption='Sunrise by the mountains')
12
+ extractedInformation = pytesseract.image_to_string(image)
13
  st.write(extractedInformation)
14