Spaces:
Running
Running
display pdf
Browse files
app.py
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
import streamlit as st
|
2 |
-
from
|
3 |
import pdfplumber
|
4 |
import io
|
5 |
|
@@ -10,7 +10,7 @@ uploaded_files = st.file_uploader('Choose your .pdf file')
|
|
10 |
if uploaded_files is not None:
|
11 |
# To read file as bytes:
|
12 |
bytes_data = uploaded_files.read()
|
13 |
-
|
14 |
pdf_content = io.BytesIO(bytes_data)
|
15 |
with pdfplumber.open(pdf_content) as pdf_file:
|
16 |
for page in pdf_file.pages:
|
|
|
1 |
import streamlit as st
|
2 |
+
from streamlit_pdf_viewer import pdf_viewer
|
3 |
import pdfplumber
|
4 |
import io
|
5 |
|
|
|
10 |
if uploaded_files is not None:
|
11 |
# To read file as bytes:
|
12 |
bytes_data = uploaded_files.read()
|
13 |
+
pdf_viewer(input=bytes_data)
|
14 |
pdf_content = io.BytesIO(bytes_data)
|
15 |
with pdfplumber.open(pdf_content) as pdf_file:
|
16 |
for page in pdf_file.pages:
|