Update app.py
Browse files
app.py
CHANGED
@@ -13,17 +13,13 @@ if uploaded_pdf is not None:
|
|
13 |
text += page.getText()
|
14 |
st.write(text)
|
15 |
doc.close()
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
pdf =
|
22 |
-
|
23 |
-
|
24 |
-
pdf_display = f"""
|
25 |
-
<iframe src="data:application/pdf;base64,{base64_pdf}" width="800px" height="2100px" type="application/pdf"></iframe>
|
26 |
-
"""
|
27 |
-
st.markdown(pdf_display, unsafe_allow_html=True)
|
28 |
|
29 |
|
|
|
13 |
text += page.getText()
|
14 |
st.write(text)
|
15 |
doc.close()
|
16 |
+
#pdf_path = Path("NDS-00130.pdf")
|
17 |
+
pdf = uploaded_pdf.read()
|
18 |
+
#base64_pdf = base64.b64encode(pdf_path.read_bytes()).decode("utf-8")
|
19 |
+
base64_pdf = base64.b64encode(pdf).decode("utf-8")
|
20 |
+
pdf_display = f"""
|
21 |
+
<iframe src="data:application/pdf;base64,{base64_pdf}" width="800px" height="2100px" type="application/pdf"></iframe>
|
22 |
+
"""
|
23 |
+
st.markdown(pdf_display, unsafe_allow_html=True)
|
|
|
|
|
|
|
|
|
24 |
|
25 |
|