awacke1 commited on
Commit
e221ff4
·
1 Parent(s): 964c024

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -17,8 +17,10 @@ if uploaded_pdf is not None:
17
 
18
 
19
 
20
- pdf_path = Path("NDS-00130.pdf")
21
- base64_pdf = base64.b64encode(pdf_path.read_bytes()).decode("utf-8")
 
 
22
  pdf_display = f"""
23
  <iframe src="data:application/pdf;base64,{base64_pdf}" width="800px" height="2100px" type="application/pdf"></iframe>
24
  """
 
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
  """