awacke1 commited on
Commit
28ee1ed
·
1 Parent(s): d9b5c95

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -12
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
- #pdf_path = Path("NDS-00130.pdf")
21
- pdf = uploaded_pdf.read()
22
- #base64_pdf = base64.b64encode(pdf_path.read_bytes()).decode("utf-8")
23
- base64_pdf = base64.b64encode(pdf).decode("utf-8")
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