create a video of uterus with a growing pregnancy
Medical illustration of a cross-section of a human uterus showing a growing pregnancy, with a visible fetus inside the amniotic sac, placenta attached to the uterine wall, umbilical cord, cervix, and surrounding anatomy. Clean, detailed anatomical diagram with labels.
400, message: Got more than 4194304 bytes when reading: b'data: {"candidates": [{"content": {"role": "model","parts": [{"inlineData": {"mimeType": "image/png"...'.
We encountered an error while processing your request. Please try again or reach out to us for help.
create an image on hpv vaccine
Educational medical poster about HPV vaccine, showing a vaccine vial and syringe, HPV virus particles, cervical cancer prevention message, recommended age group 9-26 years, with icons of a shield for protection, male and female figures, and clean infographic style layout with key facts about Human Papillomavirus vaccination

Generate a patient education handout on HPV vaccine
mkdir -p /tmp/workspace/hpv-handout && ls /tmp/workspace/hpv-handout/
~/hpv-handout/create_handout.py
from docx import Document
from docx.shared import Pt, Inches, RGBColor
from docx.enum.text import WD_ALIGN_PARAGRAPH
from docx.oxml.ns import qn
from docx.oxml import OxmlElement
import copy
doc = Document()
# ββ Page margins ββββββββββββββββββββββββββββββββββββββββββββββ
from docx.shared import Inches
section = doc.sections[0]
section.top_margin = Inches(0.9)
section.bottom_margin = Inches(0.9)
section.left_margin = Inches(1.0)
section.right_margin = Inches(1.0)
# ββ Default Normal style ββββββββββββββββββββββββββββββββββββββ
normal = doc.styles["Normal"]
normal.font.name = "Calibri"
normal.font.size = Pt(11)
# ββ Helper: shade a table cell βββββββββββββββββββββββββββββββββ
def shade_cell(cell, fill_hex):
tc = cell._tc
tcPr = tc.get_or_add_tcPr()
shd = OxmlElement("w:shd")
shd.set(qn("w:val"), "clear")
shd.set(qn("w:color"), "auto")
shd.set(qn("w:fill"), fill_hex)
tcPr.append(shd)
# ββ Helper: set paragraph border (bottom rule) βββββββββββββββββ
def add_bottom_border(paragraph, color="4472C4", size="12"):
pPr = paragraph._p.get_or_add_pPr()
pBdr = OxmlElement("w:pBdr")
bot = OxmlElement("w:bottom")
bot.set(qn("w:val"), "single")
bot.set(qn("w:sz"), size)
bot.set(qn("w:space"), "1")
bot.set(qn("w:color"), color)
pBdr.append(bot)
pPr.append(pBdr)
# ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
# HEADER BANNER
# ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
banner = doc.add_paragraph()
banner.alignment = WD_ALIGN_PARAGRAPH.CENTER
# Blue background via table trick
table_banner = doc.add_table(rows=1, cols=1)
table_banner.style = "Table Grid"
cell = table_banner.cell(0, 0)
shade_cell(cell, "1F4E79") # dark blue
cell.paragraphs[0].alignment = WD_ALIGN_PARAGRAPH.CENTER
run = cell.paragraphs[0].add_run("HPV VACCINE")
run.font.name = "Calibri"
run.font.size = Pt(26)
run.font.bold = True
run.font.color.rgb = RGBColor(0xFF, 0xFF, 0xFF)
sub = cell.add_paragraph()
sub.alignment = WD_ALIGN_PARAGRAPH.CENTER
sub_run = sub.add_run("Patient Education Handout")
sub_run.font.name = "Calibri"
sub_run.font.size = Pt(13)
sub_run.font.color.rgb = RGBColor(0xBD, 0xD7, 0xEE)
doc.add_paragraph() # spacer
# ββ Intro paragraph ββββββββββββββββββββββββββββββββββββββββββββ
intro = doc.add_paragraph()
intro.alignment = WD_ALIGN_PARAGRAPH.JUSTIFY
r = intro.add_run(
"Human Papillomavirus (HPV) is the most common sexually transmitted infection "
"worldwide. Most people who are sexually active will contract HPV at some point in "
"their lives. Fortunately, safe and highly effective vaccines can prevent the types "
"of HPV that most often cause cancers and genital warts."
)
r.font.size = Pt(11)
doc.add_paragraph()
# ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
# Section helper
# ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
def section_heading(text, color_hex="1F4E79"):
h = doc.add_paragraph()
run = h.add_run(text.upper())
run.font.name = "Calibri"
run.font.size = Pt(12)
run.font.bold = True
run.font.color.rgb = RGBColor(
int(color_hex[0:2], 16),
int(color_hex[2:4], 16),
int(color_hex[4:6], 16)
)
add_bottom_border(h)
h.paragraph_format.space_before = Pt(8)
h.paragraph_format.space_after = Pt(4)
return h
def bullet(text, bold_prefix=""):
p = doc.add_paragraph(style="List Bullet")
p.paragraph_format.left_indent = Inches(0.25)
p.paragraph_format.space_after = Pt(3)
if bold_prefix:
rb = p.add_run(bold_prefix)
rb.font.bold = True
rb.font.size = Pt(11)
rn = p.add_run(text)
rn.font.size = Pt(11)
return p
def body_para(text):
p = doc.add_paragraph()
p.alignment = WD_ALIGN_PARAGRAPH.JUSTIFY
r = p.add_run(text)
r.font.size = Pt(11)
p.paragraph_format.space_after = Pt(4)
return p
# ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
# WHAT IS HPV?
# ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
section_heading("What Is HPV?")
bullet("HPV is a group of more than 200 related viruses spread through skin-to-skin sexual contact.")
bullet("About 40 types affect the genitals, mouth, and throat.")
bullet("High-risk types (especially HPV 16 and 18) cause most HPV-related cancers.")
bullet("Low-risk types (especially HPV 6 and 11) cause genital warts.")
bullet("Most HPV infections clear on their own, but persistent infection can lead to cancer.")
doc.add_paragraph()
# ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
# CANCERS CAUSED BY HPV
# ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
section_heading("Cancers & Conditions Caused by HPV")
# Two-column table for cancers
t = doc.add_table(rows=1, cols=2)
t.style = "Table Grid"
hdr_cells = t.rows[0].cells
for i, txt in enumerate(["Cancer Type", "HPV Responsible"]):
shade_cell(hdr_cells[i], "2E75B6")
run = hdr_cells[i].paragraphs[0].add_run(txt)
run.font.bold = True
run.font.color.rgb = RGBColor(0xFF, 0xFF, 0xFF)
run.font.size = Pt(11)
data = [
("Cervical cancer", "Almost all cases β HPV 16 & 18"),
("Oropharyngeal cancer","HPV 16 (rising incidence)"),
("Anal cancer", "~90% cases"),
("Vaginal cancer", "~65% cases"),
("Vulvar cancer", "~50% cases"),
("Penile cancer", "~50% cases"),
("Genital warts", "HPV 6 & 11 (not cancer-causing)"),
]
for i, (cancer, hpv) in enumerate(data):
row = t.add_row().cells
fill = "DEEAF1" if i % 2 == 0 else "FFFFFF"
shade_cell(row[0], fill); shade_cell(row[1], fill)
row[0].paragraphs[0].add_run(cancer).font.size = Pt(10.5)
row[1].paragraphs[0].add_run(hpv).font.size = Pt(10.5)
doc.add_paragraph()
# ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
# ABOUT THE VACCINE
# ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
section_heading("About the HPV Vaccine")
body_para(
"The currently recommended vaccine is Gardasil 9 (9-valent HPV vaccine). "
"It protects against 9 HPV types: 6, 11, 16, 18, 31, 33, 45, 52, and 58."
)
bullet("Prevents ~90% of HPV-related cancers and genital warts.")
bullet("Works best before any exposure to HPV β ideally before sexual activity begins.")
bullet("Does NOT treat existing HPV infections or HPV-related diseases.")
bullet("Contains virus-like particles (VLPs) β NO live virus, so it cannot cause HPV infection.")
doc.add_paragraph()
# ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
# WHO SHOULD GET IT
# ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
section_heading("Who Should Get the HPV Vaccine?")
# Highlighted box
t2 = doc.add_table(rows=1, cols=1)
t2.style = "Table Grid"
c = t2.cell(0, 0)
shade_cell(c, "EBF3FB")
c.paragraphs[0].add_run("Recommended Ages at a Glance").font.bold = True
recs = [
("Routine vaccination:", "Ages 11-12 years (can start as early as age 9)"),
("Catch-up vaccination:", "Ages 13-26 for those not previously vaccinated"),
("Shared decision with doctor:", "Ages 27-45 based on individual risk"),
("Immunocompromised individuals:", "Should follow healthcare provider's guidance"),
("Both males and females:", "The vaccine is recommended for everyone"),
]
for prefix, detail in recs:
row_p = c.add_paragraph()
rb = row_p.add_run(f" {prefix} ")
rb.font.bold = True
rb.font.size = Pt(11)
row_p.add_run(detail).font.size = Pt(11)
doc.add_paragraph()
# ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
# DOSING SCHEDULE
# ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
section_heading("Dosing Schedule")
t3 = doc.add_table(rows=1, cols=3)
t3.style = "Table Grid"
for i, txt in enumerate(["Age at First Dose", "Number of Doses", "Schedule"]):
shade_cell(t3.rows[0].cells[i], "2E75B6")
r = t3.rows[0].cells[i].paragraphs[0].add_run(txt)
r.font.bold = True
r.font.color.rgb = RGBColor(0xFF, 0xFF, 0xFF)
r.font.size = Pt(11)
schedule_data = [
("9-14 years", "2 doses", "0 and 6-12 months"),
("15-26 years", "3 doses", "0, 1-2, and 6 months"),
("27-45 years", "3 doses (shared decision)", "0, 1-2, and 6 months"),
]
for i, (age, doses, sched) in enumerate(schedule_data):
row = t3.add_row().cells
fill = "DEEAF1" if i % 2 == 0 else "FFFFFF"
for cell in row: shade_cell(cell, fill)
row[0].paragraphs[0].add_run(age).font.size = Pt(10.5)
row[1].paragraphs[0].add_run(doses).font.size = Pt(10.5)
row[2].paragraphs[0].add_run(sched).font.size = Pt(10.5)
doc.add_paragraph()
# ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
# SIDE EFFECTS
# ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
section_heading("Common Side Effects")
body_para("The HPV vaccine is very safe. Side effects are usually mild and go away on their own.")
bullet("Pain, redness, or swelling at the injection site (most common)")
bullet("Mild fever")
bullet("Headache or dizziness")
bullet("Nausea")
bullet("Fainting (syncope) - sit or lie down for 15 minutes after vaccination")
doc.add_paragraph()
body_para(
"Serious allergic reactions (anaphylaxis) are rare. Tell your healthcare provider "
"immediately if you experience difficulty breathing, rapid heartbeat, dizziness, or "
"swelling of the throat after vaccination."
)
doc.add_paragraph()
# ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
# WHO SHOULD NOT GET IT
# ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
section_heading("Who Should NOT Get the HPV Vaccine?")
bullet("People with a severe allergic reaction to a previous HPV vaccine dose")
bullet("People with severe allergy to yeast (the vaccine contains yeast proteins)")
bullet("", bold_prefix="Pregnancy: ")
p = doc.paragraphs[-1]
p.runs[-1].text = ""
# redo
p2 = doc.add_paragraph(style="List Bullet")
p2.paragraph_format.left_indent = Inches(0.25)
rb2 = p2.add_run("Pregnancy: ")
rb2.font.bold = True
rb2.font.size = Pt(11)
p2.add_run("Vaccination should be deferred until after delivery. If pregnancy is discovered mid-series, complete remaining doses after delivery.").font.size = Pt(11)
doc.add_paragraph()
# ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
# IMPORTANT REMINDERS
# ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
section_heading("Important Reminders", color_hex="C55A11")
t4 = doc.add_table(rows=1, cols=1)
t4.style = "Table Grid"
c4 = t4.cell(0, 0)
shade_cell(c4, "FFF2CC")
reminders = [
"The HPV vaccine does NOT replace regular Pap smears / cervical cancer screening.",
"The vaccine does NOT protect against all HPV types β screening is still essential.",
"The vaccine does NOT treat existing HPV infection or cancer.",
"Use condoms to further reduce (but not eliminate) the risk of HPV and other STIs.",
"Complete the full series for maximum protection.",
]
for i, rem in enumerate(reminders):
rp = c4.paragraphs[0] if i == 0 else c4.add_paragraph()
rp.add_run(f" \u26A0 {rem}").font.size = Pt(10.5)
doc.add_paragraph()
# ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
# FOOTER
# ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
section_heading("Questions? Talk to Your Healthcare Provider")
body_para(
"If you have any questions about the HPV vaccine - including whether it is right for "
"you or your child, cost, insurance coverage, or where to get vaccinated - please "
"speak with your doctor, nurse, or pharmacist. You can also find reliable information at:"
)
bullet("", bold_prefix="CDC (USA): ")
doc.paragraphs[-1].add_run("www.cdc.gov/hpv").font.size = Pt(11)
bullet("", bold_prefix="WHO: ")
doc.paragraphs[-1].add_run("www.who.int/immunization").font.size = Pt(11)
# Page footer note
footer_para = doc.add_paragraph()
footer_para.paragraph_format.space_before = Pt(12)
footer_para.alignment = WD_ALIGN_PARAGRAPH.CENTER
fr = footer_para.add_run(
"This handout is for educational purposes only and does not replace professional medical advice. "
"Please consult your healthcare provider for personalised recommendations."
)
fr.font.size = Pt(9)
fr.font.italic = True
fr.font.color.rgb = RGBColor(0x70, 0x70, 0x70)
# ββ Save ββββββββββββββββββββββββββββββββββββββββββββββββββββββ
out = "/tmp/workspace/hpv-handout/HPV_Vaccine_Patient_Education.docx"
doc.save(out)
print(f"Saved: {out}")
cd /tmp/workspace/hpv-handout && python3 create_handout.py
HPV Vaccine Patient Education
Word Document Β· DOCX