Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -22,6 +22,7 @@ def read_(file):
|
|
| 22 |
for page in pdf.pages:
|
| 23 |
text.append(page.extract_text())
|
| 24 |
text_str = ' '.join([page for page in text])
|
|
|
|
| 25 |
return text_str
|
| 26 |
|
| 27 |
|
|
@@ -68,6 +69,6 @@ st.markdown("## 📌 Step One: Upload document ")
|
|
| 68 |
|
| 69 |
with st.container():
|
| 70 |
|
| 71 |
-
file = st.file_uploader('Upload PDF File', type=['pdf'])
|
| 72 |
text_str = read_(file)
|
| 73 |
-
|
|
|
|
| 22 |
for page in pdf.pages:
|
| 23 |
text.append(page.extract_text())
|
| 24 |
text_str = ' '.join([page for page in text])
|
| 25 |
+
st.write('Number of pages:',len(pdf.pages))
|
| 26 |
return text_str
|
| 27 |
|
| 28 |
|
|
|
|
| 69 |
|
| 70 |
with st.container():
|
| 71 |
|
| 72 |
+
##file = st.file_uploader('Upload PDF File', type=['pdf'])
|
| 73 |
text_str = read_(file)
|
| 74 |
+
|