Can you create ppt
mkdir -p /tmp/workspace/ai-presentation && ls /tmp/workspace/ai-presentation/
~/ai-presentation/create_ppt.py
from pptx import Presentation
from pptx.util import Inches, Pt, Emu
from pptx.dml.color import RGBColor
from pptx.enum.text import PP_ALIGN, MSO_ANCHOR
from pptx.util import Inches, Pt
from io import BytesIO
# ─── Color Palette ───────────────────────────────────────────────
DARK_BG = RGBColor(0x0D, 0x1B, 0x2A) # Deep navy
ACCENT = RGBColor(0x00, 0xB4, 0xD8) # Cyan blue
ACCENT2 = RGBColor(0x90, 0xE0, 0xEF) # Light cyan
WHITE = RGBColor(0xFF, 0xFF, 0xFF)
LIGHT_GRAY = RGBColor(0xCC, 0xD6, 0xE0)
CARD_BG = RGBColor(0x1A, 0x2E, 0x44) # Slightly lighter navy for cards
HIGHLIGHT = RGBColor(0xFF, 0xB7, 0x03) # Amber accent
# ─── Helpers ─────────────────────────────────────────────────────
def add_rect(slide, x, y, w, h, color, transparency=0):
from pptx.oxml.ns import qn
from lxml import etree
shape = slide.shapes.add_shape(1, Inches(x), Inches(y), Inches(w), Inches(h))
shape.line.fill.background()
shape.fill.solid()
shape.fill.fore_color.rgb = color
return shape
def add_text(slide, text, x, y, w, h, font_size=18, bold=False, color=WHITE,
align=PP_ALIGN.LEFT, italic=False, font_name="Calibri"):
tb = slide.shapes.add_textbox(Inches(x), Inches(y), Inches(w), Inches(h))
tf = tb.text_frame
tf.word_wrap = True
tf.margin_left = Pt(0)
tf.margin_right = Pt(0)
tf.margin_top = Pt(2)
tf.margin_bottom = Pt(2)
p = tf.paragraphs[0]
p.alignment = align
run = p.add_run()
run.text = text
run.font.size = Pt(font_size)
run.font.bold = bold
run.font.italic = italic
run.font.color.rgb = color
run.font.name = font_name
return tb
def fill_slide_bg(slide, color):
from pptx.oxml.ns import qn
from lxml import etree
bg = slide.background
fill = bg.fill
fill.solid()
fill.fore_color.rgb = color
def add_bullet_textbox(slide, items, x, y, w, h, font_size=16, color=WHITE,
bullet_color=None, font_name="Calibri"):
tb = slide.shapes.add_textbox(Inches(x), Inches(y), Inches(w), Inches(h))
tf = tb.text_frame
tf.word_wrap = True
tf.margin_left = Pt(4)
tf.margin_right = Pt(4)
tf.margin_top = Pt(4)
tf.margin_bottom = Pt(4)
for i, item in enumerate(items):
p = tf.paragraphs[0] if i == 0 else tf.add_paragraph()
p.space_before = Pt(6)
run = p.add_run()
run.text = f" • {item}"
run.font.size = Pt(font_size)
run.font.color.rgb = color
run.font.name = font_name
return tb
# ─── Presentation Setup ──────────────────────────────────────────
prs = Presentation()
prs.slide_width = Inches(13.333)
prs.slide_height = Inches(7.5)
blank = prs.slide_layouts[6]
# ════════════════════════════════════════════════════════════════
# SLIDE 1 – Title Slide
# ════════════════════════════════════════════════════════════════
slide = prs.slides.add_slide(blank)
fill_slide_bg(slide, DARK_BG)
# Left accent bar
add_rect(slide, 0, 0, 0.07, 7.5, ACCENT)
# Large decorative circle (top-right)
from pptx.util import Emu
circ = slide.shapes.add_shape(9, Inches(9.5), Inches(-1.5), Inches(5), Inches(5))
circ.fill.solid()
circ.fill.fore_color.rgb = CARD_BG
circ.line.fill.background()
# Inner circle accent
circ2 = slide.shapes.add_shape(9, Inches(10.2), Inches(-0.8), Inches(3.5), Inches(3.5))
circ2.fill.solid()
circ2.fill.fore_color.rgb = ACCENT
circ2.line.fill.background()
# Subtitle label
add_text(slide, "TECHNOLOGY PRESENTATION", 0.6, 1.6, 9, 0.5,
font_size=13, color=ACCENT, font_name="Calibri")
# Main title
add_text(slide, "Artificial Intelligence", 0.6, 2.1, 11, 1.3,
font_size=52, bold=True, color=WHITE, font_name="Calibri")
add_text(slide, "in the Modern World", 0.6, 3.3, 11, 1,
font_size=36, bold=False, color=ACCENT2, font_name="Calibri")
# Divider line
div = slide.shapes.add_shape(1, Inches(0.6), Inches(4.5), Inches(5), Inches(0.04))
div.fill.solid()
div.fill.fore_color.rgb = ACCENT
div.line.fill.background()
# Byline
add_text(slide, "Exploring how AI is reshaping industries, society, and the future",
0.6, 4.7, 11, 0.6, font_size=16, color=LIGHT_GRAY, italic=True, font_name="Calibri")
add_text(slide, "July 2026", 0.6, 5.5, 4, 0.4,
font_size=13, color=ACCENT, font_name="Calibri")
# ════════════════════════════════════════════════════════════════
# SLIDE 2 – Agenda
# ════════════════════════════════════════════════════════════════
slide = prs.slides.add_slide(blank)
fill_slide_bg(slide, DARK_BG)
add_rect(slide, 0, 0, 0.07, 7.5, ACCENT)
add_text(slide, "AGENDA", 0.5, 0.25, 4, 0.45,
font_size=12, color=ACCENT, bold=True, font_name="Calibri")
add_text(slide, "What We'll Cover", 0.5, 0.7, 10, 0.9,
font_size=34, bold=True, color=WHITE, font_name="Calibri")
div = slide.shapes.add_shape(1, Inches(0.5), Inches(1.55), Inches(3), Inches(0.04))
div.fill.solid(); div.fill.fore_color.rgb = ACCENT; div.line.fill.background()
agenda_items = [
("01", "What is Artificial Intelligence?"),
("02", "Key AI Technologies"),
("03", "AI Across Industries"),
("04", "Benefits & Challenges"),
("05", "The Road Ahead"),
("06", "Key Takeaways"),
]
for i, (num, title) in enumerate(agenda_items):
col = 0 if i < 3 else 6.5
row = 1.85 + (i % 3) * 1.5
card = add_rect(slide, col + 0.4, row, 6.0, 1.2, CARD_BG)
add_text(slide, num, col + 0.7, row + 0.1, 0.9, 0.8,
font_size=26, bold=True, color=ACCENT, font_name="Calibri")
add_text(slide, title, col + 1.65, row + 0.25, 4.5, 0.7,
font_size=16, bold=False, color=WHITE, font_name="Calibri")
# ════════════════════════════════════════════════════════════════
# SLIDE 3 – What is AI?
# ════════════════════════════════════════════════════════════════
slide = prs.slides.add_slide(blank)
fill_slide_bg(slide, DARK_BG)
add_rect(slide, 0, 0, 0.07, 7.5, ACCENT)
add_text(slide, "INTRODUCTION", 0.5, 0.25, 6, 0.4,
font_size=12, color=ACCENT, bold=True, font_name="Calibri")
add_text(slide, "What is Artificial Intelligence?", 0.5, 0.65, 12, 0.9,
font_size=34, bold=True, color=WHITE, font_name="Calibri")
div = slide.shapes.add_shape(1, Inches(0.5), Inches(1.5), Inches(3.5), Inches(0.04))
div.fill.solid(); div.fill.fore_color.rgb = ACCENT; div.line.fill.background()
# Definition box
def_box = add_rect(slide, 0.5, 1.7, 7.2, 1.6, CARD_BG)
add_text(slide,
"\"Artificial Intelligence is the simulation of human intelligence "
"processes by computer systems — including learning, reasoning, "
"problem-solving, perception, and language understanding.\"",
0.75, 1.8, 6.8, 1.4, font_size=15, italic=True,
color=ACCENT2, font_name="Calibri")
# Three pillars
pillars = [
("🧠", "Machine\nLearning", "Algorithms that learn from data and improve over time"),
("👁️", "Computer\nVision", "Machines that interpret and understand visual input"),
("💬", "Natural\nLanguage", "AI that reads, understands, and generates human language"),
]
for i, (icon, title, desc) in enumerate(pillars):
x = 0.5 + i * 4.2
add_rect(slide, x, 3.5, 3.9, 2.8, CARD_BG)
add_text(slide, icon, x + 0.2, 3.6, 0.8, 0.7, font_size=24, color=WHITE, font_name="Segoe UI Emoji")
add_text(slide, title, x + 0.25, 4.35, 3.5, 0.75,
font_size=17, bold=True, color=ACCENT, font_name="Calibri")
add_text(slide, desc, x + 0.25, 5.1, 3.4, 1.1,
font_size=13, color=LIGHT_GRAY, font_name="Calibri")
# ════════════════════════════════════════════════════════════════
# SLIDE 4 – Key Technologies
# ════════════════════════════════════════════════════════════════
slide = prs.slides.add_slide(blank)
fill_slide_bg(slide, DARK_BG)
add_rect(slide, 0, 0, 0.07, 7.5, ACCENT)
add_text(slide, "TECHNOLOGIES", 0.5, 0.25, 6, 0.4,
font_size=12, color=ACCENT, bold=True, font_name="Calibri")
add_text(slide, "Key AI Technologies", 0.5, 0.65, 12, 0.9,
font_size=34, bold=True, color=WHITE, font_name="Calibri")
div = slide.shapes.add_shape(1, Inches(0.5), Inches(1.5), Inches(3.5), Inches(0.04))
div.fill.solid(); div.fill.fore_color.rgb = ACCENT; div.line.fill.background()
tech = [
("Deep Learning", "Neural networks with multiple layers that mimic the brain's structure to recognize patterns in images, text, and audio."),
("Large Language Models", "Transformer-based models (GPT, LLaMA, Gemini) trained on vast text data to understand and generate human language."),
("Reinforcement Learning", "AI agents that learn optimal strategies by interacting with environments and receiving reward/penalty feedback."),
("Generative AI", "Models that create new content — images, audio, video, code — from a simple text prompt (DALL-E, Stable Diffusion, Sora)."),
]
for i, (title, desc) in enumerate(tech):
row = 1.75 + i * 1.35
add_rect(slide, 0.5, row, 12.3, 1.2, CARD_BG)
# Number badge
badge = add_rect(slide, 0.5, row, 0.6, 1.2, ACCENT)
add_text(slide, str(i + 1), 0.52, row + 0.25, 0.55, 0.6,
font_size=20, bold=True, color=DARK_BG, align=PP_ALIGN.CENTER, font_name="Calibri")
add_text(slide, title, 1.25, row + 0.1, 3.0, 0.45,
font_size=16, bold=True, color=ACCENT, font_name="Calibri")
add_text(slide, desc, 1.25, row + 0.55, 11.2, 0.6,
font_size=13, color=LIGHT_GRAY, font_name="Calibri")
# ════════════════════════════════════════════════════════════════
# SLIDE 5 – AI Across Industries
# ════════════════════════════════════════════════════════════════
slide = prs.slides.add_slide(blank)
fill_slide_bg(slide, DARK_BG)
add_rect(slide, 0, 0, 0.07, 7.5, ACCENT)
add_text(slide, "APPLICATIONS", 0.5, 0.25, 6, 0.4,
font_size=12, color=ACCENT, bold=True, font_name="Calibri")
add_text(slide, "AI Across Industries", 0.5, 0.65, 12, 0.9,
font_size=34, bold=True, color=WHITE, font_name="Calibri")
div = slide.shapes.add_shape(1, Inches(0.5), Inches(1.5), Inches(3.5), Inches(0.04))
div.fill.solid(); div.fill.fore_color.rgb = ACCENT; div.line.fill.background()
industries = [
("Healthcare", "Disease diagnosis, drug discovery, robotic surgery, personalized medicine"),
("Finance", "Fraud detection, algorithmic trading, credit scoring, risk management"),
("Education", "Adaptive learning, automated grading, personalized tutoring systems"),
("Transportation", "Self-driving vehicles, route optimization, traffic management"),
("Retail", "Recommendation engines, inventory management, customer service chatbots"),
("Manufacturing", "Predictive maintenance, quality control, autonomous robots"),
]
for i, (industry, desc) in enumerate(industries):
col = i % 3
row = i // 3
x = 0.5 + col * 4.3
y = 1.75 + row * 2.65
add_rect(slide, x, y, 4.0, 2.4, CARD_BG)
# Top accent line
line = slide.shapes.add_shape(1, Inches(x), Inches(y), Inches(4.0), Inches(0.07))
line.fill.solid(); line.fill.fore_color.rgb = ACCENT; line.line.fill.background()
add_text(slide, industry, x + 0.2, y + 0.15, 3.6, 0.55,
font_size=17, bold=True, color=WHITE, font_name="Calibri")
add_text(slide, desc, x + 0.2, y + 0.75, 3.6, 1.5,
font_size=13, color=LIGHT_GRAY, font_name="Calibri")
# ════════════════════════════════════════════════════════════════
# SLIDE 6 – Benefits & Challenges
# ════════════════════════════════════════════════════════════════
slide = prs.slides.add_slide(blank)
fill_slide_bg(slide, DARK_BG)
add_rect(slide, 0, 0, 0.07, 7.5, ACCENT)
add_text(slide, "ANALYSIS", 0.5, 0.25, 6, 0.4,
font_size=12, color=ACCENT, bold=True, font_name="Calibri")
add_text(slide, "Benefits & Challenges", 0.5, 0.65, 12, 0.9,
font_size=34, bold=True, color=WHITE, font_name="Calibri")
div = slide.shapes.add_shape(1, Inches(0.5), Inches(1.5), Inches(3.5), Inches(0.04))
div.fill.solid(); div.fill.fore_color.rgb = ACCENT; div.line.fill.background()
# Benefits panel
add_rect(slide, 0.5, 1.75, 5.9, 5.4, CARD_BG)
top_line = slide.shapes.add_shape(1, Inches(0.5), Inches(1.75), Inches(5.9), Inches(0.08))
top_line.fill.solid(); top_line.fill.fore_color.rgb = RGBColor(0x06, 0xD6, 0xA0); top_line.line.fill.background()
add_text(slide, "✅ Benefits", 0.7, 1.9, 5.5, 0.6,
font_size=20, bold=True, color=RGBColor(0x06, 0xD6, 0xA0), font_name="Calibri")
benefits = [
"Automates repetitive and complex tasks",
"Enables 24/7 operations without fatigue",
"Processes vast data faster than humans",
"Improves accuracy and consistency",
"Drives new scientific discoveries",
"Enhances accessibility and inclusion",
]
add_bullet_textbox(slide, benefits, 0.6, 2.5, 5.6, 3.9,
font_size=14, color=LIGHT_GRAY, font_name="Calibri")
# Challenges panel
add_rect(slide, 6.9, 1.75, 5.9, 5.4, CARD_BG)
ch_line = slide.shapes.add_shape(1, Inches(6.9), Inches(1.75), Inches(5.9), Inches(0.08))
ch_line.fill.solid(); ch_line.fill.fore_color.rgb = RGBColor(0xEF, 0x47, 0x6F); ch_line.line.fill.background()
add_text(slide, "⚠️ Challenges", 7.1, 1.9, 5.5, 0.6,
font_size=20, bold=True, color=RGBColor(0xEF, 0x47, 0x6F), font_name="Calibri")
challenges = [
"Bias and fairness in AI decision-making",
"Privacy concerns with data collection",
"Job displacement and workforce changes",
"Lack of explainability ('black box' AI)",
"Cybersecurity and misuse risks",
"High energy and resource consumption",
]
add_bullet_textbox(slide, challenges, 7.0, 2.5, 5.6, 3.9,
font_size=14, color=LIGHT_GRAY, font_name="Calibri")
# ════════════════════════════════════════════════════════════════
# SLIDE 7 – The Road Ahead
# ════════════════════════════════════════════════════════════════
slide = prs.slides.add_slide(blank)
fill_slide_bg(slide, DARK_BG)
add_rect(slide, 0, 0, 0.07, 7.5, ACCENT)
add_text(slide, "FUTURE OUTLOOK", 0.5, 0.25, 6, 0.4,
font_size=12, color=ACCENT, bold=True, font_name="Calibri")
add_text(slide, "The Road Ahead", 0.5, 0.65, 12, 0.9,
font_size=34, bold=True, color=WHITE, font_name="Calibri")
div = slide.shapes.add_shape(1, Inches(0.5), Inches(1.5), Inches(3.5), Inches(0.04))
div.fill.solid(); div.fill.fore_color.rgb = ACCENT; div.line.fill.background()
timeline = [
("Near-term\n(2025-2027)", [
"AI agents performing multi-step tasks autonomously",
"Broader adoption of AI copilots in workplaces",
"Regulation and governance frameworks maturing",
]),
("Mid-term\n(2028-2032)", [
"AI-assisted scientific breakthroughs (medicine, climate)",
"Widespread human-AI collaboration in creative fields",
"Significant advances in robotics and physical AI",
]),
("Long-term\n(2033+)", [
"Potential for Artificial General Intelligence (AGI)",
"AI-driven solutions for global challenges",
"Deep integration of AI in everyday infrastructure",
]),
]
for i, (period, points) in enumerate(timeline):
x = 0.5 + i * 4.3
add_rect(slide, x, 1.75, 4.0, 5.4, CARD_BG)
period_line = slide.shapes.add_shape(1, Inches(x), Inches(1.75), Inches(4.0), Inches(0.08))
period_line.fill.solid(); period_line.fill.fore_color.rgb = ACCENT; period_line.line.fill.background()
add_text(slide, period, x + 0.2, 1.9, 3.6, 0.9,
font_size=15, bold=True, color=ACCENT, font_name="Calibri")
add_bullet_textbox(slide, points, x + 0.1, 2.8, 3.8, 3.9,
font_size=13, color=LIGHT_GRAY, font_name="Calibri")
# ════════════════════════════════════════════════════════════════
# SLIDE 8 – Key Takeaways
# ════════════════════════════════════════════════════════════════
slide = prs.slides.add_slide(blank)
fill_slide_bg(slide, DARK_BG)
add_rect(slide, 0, 0, 0.07, 7.5, ACCENT)
add_text(slide, "CONCLUSION", 0.5, 0.25, 6, 0.4,
font_size=12, color=ACCENT, bold=True, font_name="Calibri")
add_text(slide, "Key Takeaways", 0.5, 0.65, 12, 0.9,
font_size=34, bold=True, color=WHITE, font_name="Calibri")
div = slide.shapes.add_shape(1, Inches(0.5), Inches(1.5), Inches(3.5), Inches(0.04))
div.fill.solid(); div.fill.fore_color.rgb = ACCENT; div.line.fill.background()
takeaways = [
("AI is Already Here", "It powers the apps, services, and tools billions of people use every day."),
("Opportunity is Vast", "Industries from healthcare to finance are being reshaped by intelligent systems."),
("Responsibility Matters", "Ethical AI development is essential to ensure fairness, privacy, and trust."),
("Adapt & Collaborate", "The future belongs to those who learn to work alongside AI, not against it."),
]
for i, (title, desc) in enumerate(takeaways):
row = 1.8 + i * 1.3
add_rect(slide, 0.5, row, 12.3, 1.15, CARD_BG)
# Number badge
badge = add_rect(slide, 0.5, row, 0.55, 1.15, HIGHLIGHT)
add_text(slide, str(i + 1), 0.5, row + 0.25, 0.55, 0.6,
font_size=20, bold=True, color=DARK_BG, align=PP_ALIGN.CENTER, font_name="Calibri")
add_text(slide, title, 1.2, row + 0.08, 3.0, 0.45,
font_size=16, bold=True, color=HIGHLIGHT, font_name="Calibri")
add_text(slide, desc, 1.2, row + 0.55, 11.2, 0.5,
font_size=13, color=LIGHT_GRAY, font_name="Calibri")
# Final call-to-action bar
add_rect(slide, 0.5, 7.0, 12.3, 0.35, ACCENT)
add_text(slide,
"\"The question is not whether AI will change the world — it already has. The question is how we shape that change.\"",
0.7, 7.0, 12.0, 0.35, font_size=11, italic=True,
color=DARK_BG, align=PP_ALIGN.CENTER, font_name="Calibri")
# ─── Save ────────────────────────────────────────────────────────
output_path = "/tmp/workspace/ai-presentation/AI_in_the_Modern_World.pptx"
buf = BytesIO()
prs.save(buf)
with open(output_path, "wb") as f:
f.write(buf.getvalue())
print(f"Saved: {output_path}")
python /tmp/workspace/ai-presentation/create_ppt.py
AI in the Modern World
Presentation · PPTX
| Slide | Title |
|---|---|
| 1 | Title Slide - "Artificial Intelligence in the Modern World" |
| 2 | Agenda - Overview of all 6 topics |
| 3 | What is Artificial Intelligence? (3 pillars: ML, Vision, NLP) |
| 4 | Key AI Technologies (Deep Learning, LLMs, RL, Generative AI) |
| 5 | AI Across Industries (6 sectors: Healthcare, Finance, Education, etc.) |
| 6 | Benefits & Challenges (side-by-side comparison panels) |
| 7 | The Road Ahead (near / mid / long-term timeline cards) |
| 8 | Key Takeaways + closing quote |