Rammohan0504 commited on
Commit
4158201
·
verified ·
1 Parent(s): 6513ade

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -6
app.py CHANGED
@@ -203,14 +203,19 @@ def build_health_card(profile_image, test_results, summary, patient_name="", pat
203
  </div>
204
 
205
  <div style="display: flex; gap: 15px; justify-content: center; flex-wrap: wrap;">
206
- <button onclick="window.print()" style="padding: 12px 24px; background: linear-gradient(135deg, #4caf50, #45a049); color: white; border: none; border-radius: 8px; cursor: pointer; font-weight: 600; font-size: 14px; box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3); transition: all 0.3s;">
207
- 📥 Download Report
208
- </button>
209
- <button style="padding: 12px 24px; background: linear-gradient(135deg, #2196f3, #1976d2); color: white; border: none; border-radius: 8px; cursor: pointer; font-weight: 600; font-size: 14px; box-shadow: 0 4px 12px rgba(33, 150, 243, 0.3);">
210
- 📞 Find Labs Near Me
211
- </button>
212
  </div>
213
  </div>
 
 
 
 
 
 
214
  """
215
  return html
216
 
 
203
  </div>
204
 
205
  <div style="display: flex; gap: 15px; justify-content: center; flex-wrap: wrap;">
206
+ <a href="{pdf_filepath}" download="Health_Report.pdf">
207
+ <button style="padding: 12px 24px; background: linear-gradient(135deg, #4caf50, #45a049); color: white; border: none; border-radius: 8px; cursor: pointer; font-weight: 600; font-size: 14px; box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3); transition: all 0.3s;">
208
+ 📥 Download Report
209
+ </button>
210
+ </a>
 
211
  </div>
212
  </div>
213
+ <style>
214
+ @media print {{
215
+ /* Hide input sections during print */
216
+ .gradio-container {{ display: none; }}
217
+ }}
218
+ </style>
219
  """
220
  return html
221