ssh-AI commited on
Commit
474327c
·
verified ·
1 Parent(s): dd99add

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +13 -13
app.py CHANGED
@@ -82,16 +82,16 @@ if uploaded_files:
82
  pdf_bytes = f.read()
83
  b64_pdf = base64.b64encode(pdf_bytes).decode()
84
 
85
- download_link = f"""
86
- <a href="data:application/pdf;base64,{b64_pdf}" download="{pdf_output_path}"
87
- style="
88
- display:inline-block;
89
- padding:12px 24px;
90
- font-size:18px;
91
- font-weight:bold;
92
- color:white;
93
- background: linear-gradient(135deg, #4CAF50 0%, #81C784 100%);
94
- border-radius:10px;
95
- text-decoration:none;
96
- text-align:center;">
97
- 📄 D
 
82
  pdf_bytes = f.read()
83
  b64_pdf = base64.b64encode(pdf_bytes).decode()
84
 
85
+ download_link = (
86
+ '<a href="data:application/pdf;base64,' + b64_pdf + '" '
87
+ 'download="' + pdf_output_path + '" '
88
+ 'style="display:inline-block; padding:12px 24px; font-size:18px; font-weight:bold; '
89
+ 'color:white; background: linear-gradient(135deg, #4CAF50 0%, #81C784 100%); '
90
+ 'border-radius:10px; text-decoration:none; text-align:center;">'
91
+ '📄 Download Cleaned PDF'
92
+ '</a>'
93
+ )
94
+
95
+ st.markdown(download_link, unsafe_allow_html=True)
96
+
97
+ st.success("✅ Images cleaned and combined into PDF successfully!")