Spaces:
Running
Running
Update app.py
Browse files
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 |
|