-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgenerate_pptx.py
More file actions
110 lines (91 loc) · 4.72 KB
/
generate_pptx.py
File metadata and controls
110 lines (91 loc) · 4.72 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
from pptx import Presentation
from pptx.util import Inches, Pt
from pptx.enum.text import PP_ALIGN
import os
def create_presentation():
prs = Presentation()
# Image Paths (generated)
img_dir = r"C:\Users\patel\.gemini\antigravity\brain\e094cf49-ab54-484a-9b8f-fdcd441cf4f2"
title_img = os.path.join(img_dir, "health_tech_title_graphic_1777719432447.png")
dashboard_img = os.path.join(img_dir, "dashboard_illustration_1777719591219.png")
safety_img = os.path.join(img_dir, "medical_ai_safety_icon_1777719604923.png")
# --- Slide 1: Title Slide ---
slide_layout = prs.slide_layouts[0]
slide = prs.slides.add_slide(slide_layout)
title = slide.shapes.title
subtitle = slide.placeholders[1]
title.text = "Health Assistant Dashboard"
subtitle.text = "AI-Powered Symptom Tracking & Compassionate Consultation\nPresented by: Koushick P"
if os.path.exists(title_img):
slide.shapes.add_picture(title_img, Inches(7), Inches(0.5), width=Inches(2.5))
# --- Slide 2: Project Overview ---
slide_layout = prs.slide_layouts[1]
slide = prs.slides.add_slide(slide_layout)
title = slide.shapes.title
title.text = "Project Overview"
content = slide.placeholders[1]
tf = content.text_frame
tf.text = "The Health Assistant Dashboard is a modern web application designed to bridge the gap between symptom tracking and immediate AI guidance."
p = tf.add_paragraph()
p.text = "• Empowers users with real-time severity analysis."
p = tf.add_paragraph()
p.text = "• Provides empathetic, cautious medical suggestions."
p = tf.add_paragraph()
p.text = "• Prioritizes user safety with proactive emergency detection."
# --- Slide 3: Key Features ---
# Use a two-column-like layout (Text left, Image right)
slide = prs.slides.add_slide(prs.slide_layouts[1])
title = slide.shapes.title
title.text = "Key Features"
content = slide.placeholders[1]
content.width = Inches(5)
tf = content.text_frame
tf.text = "1. Advanced Symptom Dashboard"
p = tf.add_paragraph(); p.text = " - Real-time Severity Breakdown (Bar Charts)"
p = tf.add_paragraph(); p.text = " - Historical Progress Tracking (Trend Lines)"
p = tf.add_paragraph(); p.text = "2. Context-Aware AI Chatbot"
p = tf.add_paragraph(); p.text = " - Reads user history from the dashboard"
p = tf.add_paragraph(); p.text = "3. Emergency Auto-Escalation"
p = tf.add_paragraph(); p.text = " - Automatic redirection to AI for high-severity logs"
if os.path.exists(dashboard_img):
slide.shapes.add_picture(dashboard_img, Inches(5.5), Inches(2), width=Inches(4))
# --- Slide 4: AI Guardrails & Safety ---
slide = prs.slides.add_slide(prs.slide_layouts[1])
title = slide.shapes.title
title.text = "AI Safety & Guardrails"
content = slide.placeholders[1]
content.width = Inches(6)
tf = content.text_frame
tf.text = "Safety is at the core of the AI persona:"
p = tf.add_paragraph(); p.text = "• No Definitive Diagnosis: Speculative language used."
p = tf.add_paragraph(); p.text = "• Empathy First: Warm and supportive doctor persona."
p = tf.add_paragraph(); p.text = "• Domain Restricted: Health-related queries only."
p = tf.add_paragraph(); p.text = "• Mandatory Disclaimers: Professional medical warnings."
if os.path.exists(safety_img):
slide.shapes.add_picture(safety_img, Inches(6.5), Inches(1.5), width=Inches(3))
# --- Slide 5: Tech Stack ---
slide = prs.slides.add_slide(prs.slide_layouts[1])
title = slide.shapes.title
title.text = "Technology Stack"
content = slide.placeholders[1]
tf = content.text_frame
tf.text = "• Frontend: Streamlit (Python)"
p = tf.add_paragraph(); p.text = "• AI Engine: OpenRouter (Llama 3.1 8B)"
p = tf.add_paragraph(); p.text = "• Data Analysis: Pandas & Dotenv"
p = tf.add_paragraph(); p.text = "• Visualization: Plotly Express"
p = tf.add_paragraph(); p.text = "• Deployment: Git & GitHub Integration"
# --- Slide 6: Conclusion ---
slide = prs.slides.add_slide(prs.slide_layouts[1])
title = slide.shapes.title
title.text = "Future Roadmap"
content = slide.placeholders[1]
tf = content.text_frame
tf.text = "• PDF Report Export: Summaries for doctors."
p = tf.add_paragraph(); p.text = "• Wearable Integration: Apple Health / Fitbit."
p = tf.add_paragraph(); p.text = "• Multilingual Support: Globally accessible care."
# Save presentation
output_path = 'Health_Assistant_Dashboard_Presentation_Visual.pptx'
prs.save(output_path)
print(f"Presentation created successfully: {output_path}")
if __name__ == "__main__":
create_presentation()