Update app.py
Browse files
app.py
CHANGED
@@ -160,14 +160,16 @@ def app2():
|
|
160 |
print("Error occured: {}".format(e))
|
161 |
raise e
|
162 |
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
|
|
|
|
171 |
|
172 |
#with open((tempfile.gettempdir()+"/annott.pdf"),"rb") as f:
|
173 |
# base64_pdf = base64.b64encode(f.read()).decode('utf-8')
|
|
|
160 |
print("Error occured: {}".format(e))
|
161 |
raise e
|
162 |
|
163 |
+
ce, c1, ce, c2, c3 = hy.columns([0.07, 1, 0.07, 4, 1.5])
|
164 |
+
with c2:
|
165 |
+
if counter !=0:
|
166 |
+
with open((tempfile.gettempdir()+"/annott.pdf"), "rb") as pdf_file:
|
167 |
+
PDFbyte = pdf_file.read()
|
168 |
+
|
169 |
+
hy.download_button(label="📥 Download Annotated PDF",
|
170 |
+
data=PDFbyte,
|
171 |
+
file_name="annotated.pdf",
|
172 |
+
mime='application/octet-stream')
|
173 |
|
174 |
#with open((tempfile.gettempdir()+"/annott.pdf"),"rb") as f:
|
175 |
# base64_pdf = base64.b64encode(f.read()).decode('utf-8')
|