peter2000 commited on
Commit
c6338e6
1 Parent(s): d4a926a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +13 -1
app.py CHANGED
@@ -49,6 +49,18 @@ with st.expander("ℹ️ - About this app", expanded=True):
49
  )
50
 
51
  st.markdown("")
52
-
53
  st.markdown("")
54
  st.markdown("## 📌 Step One: Upload document ")
 
 
 
 
 
 
 
 
 
 
 
 
 
 
49
  )
50
 
51
  st.markdown("")
 
52
  st.markdown("")
53
  st.markdown("## 📌 Step One: Upload document ")
54
+
55
+
56
+ with st.container():
57
+
58
+ file = st.file_uploader('Upload PDF File', type=['pdf'])
59
+ if file is not None:
60
+ text = []
61
+ with pdfplumber.open(file) as pdf:
62
+ for page in pdf.pages:
63
+ text.append(page.extract_text())
64
+ text_str = ' '.join([page for page in text])
65
+
66
+ st.write('Number of pages:',len(pdf.pages))