Rammohan0504 commited on
Commit
d5fa7b3
·
verified ·
1 Parent(s): 71db575

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -8
app.py CHANGED
@@ -203,12 +203,11 @@ 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
  <style>
@@ -301,7 +300,6 @@ def analyze_face(input_data):
301
  build_table("❤️ Vitals",
302
  [("SpO2", spo2, (95, 100)),
303
  ("Heart Rate", heart_rate, (60, 100)),
304
- ("Respiratory Rate", rr, (12, 20)),
305
  ("Temperature", test_values["Temperature"], (97, 99)),
306
  ("BP Systolic", test_values["BP Systolic"], (90, 120)),
307
  ("BP Diastolic", test_values["BP Diastolic"], (60, 80))])
@@ -384,4 +382,4 @@ with gr.Blocks() as demo:
384
  outputs=[result_html, result_pdf])
385
 
386
  # Launch Gradio for Replit
387
- demo.launch(server_name="0.0.0.0", server_port=7860)
 
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>
 
300
  build_table("❤️ Vitals",
301
  [("SpO2", spo2, (95, 100)),
302
  ("Heart Rate", heart_rate, (60, 100)),
 
303
  ("Temperature", test_values["Temperature"], (97, 99)),
304
  ("BP Systolic", test_values["BP Systolic"], (90, 120)),
305
  ("BP Diastolic", test_values["BP Diastolic"], (60, 80))])
 
382
  outputs=[result_html, result_pdf])
383
 
384
  # Launch Gradio for Replit
385
+ demo.launch(server_name="0.0.0.0", server_port=7860)