jackkuo commited on
Commit
77a07a6
1 Parent(s): 73a2cf2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -26,7 +26,7 @@ def view_pdf(pdf_file):
26
  pdf_data = f.read()
27
  # print("pdf_file", pdf_file)
28
  # pdf_data = pdf_file
29
- b64_data = base64.b64encode(pdf_data).decode()
30
  # print("b64_data", b64_data)
31
  return f"<embed src='data:application/pdf;base64,{b64_data}' type='application/pdf' width='100%' height='700px' />"
32
 
 
26
  pdf_data = f.read()
27
  # print("pdf_file", pdf_file)
28
  # pdf_data = pdf_file
29
+ b64_data = base64.b64encode(pdf_data).decode('utf-8')
30
  # print("b64_data", b64_data)
31
  return f"<embed src='data:application/pdf;base64,{b64_data}' type='application/pdf' width='100%' height='700px' />"
32