AWS Builder Center

Weekend Creative Challenge: picoem

A photo to poem generator that writes original English and Tamil poems in your own style using Amazon Nova on Bedrock not a translation, two independently composed poems.

Software Engineer come Cloud&Devops
Poetry was mine long before code was. Growing up, writing was just something I did long poems, short poems, whatever the moment called for, mostly in Tamil, my mother tongue. It came easily, and it came often. Then I joined tech. Somewhere between the deadlines and the debugging, the writing stopped. Not on purpose it just quietly faded into "something I used to do."
This weekend, a challenge landed in one of my AWS communities: build something creative and deploy it on at least one AWS service. I read it and thought: I work in AI every day now, and I'm good at writing why haven't I put those two things in the same room? So I built picoem.

Vision & what the app does

picoem turns a photo into two original poems about it one in English, one in Tamil written to sound like me, not like a translation of each other. You upload an image, and instead of a literal caption, you get a reflective, metaphorical reading of it: what the scene says about life, love, distance, or connection, expressed as poetry in two languages I actually write in.
The point isn't just "AI writes a poem." It's that the Tamil poem has to stand on its own composed in native Tamil idiom, with its own rhythm and imagery not backfilled from the English version. That constraint turned out to be the hardest and most interesting part of the build.

How I built it

picoem is a small  Gradio  app calling Amazon Nova Lite on Amazon Bedrock through the  converse()  API. To match my own voice, each language gets a few-shot style sample a real poem I wrote myself included in the prompt as a reference.
The architecture went through several iterations before it worked:
  • Attempt 1 one combined call, asking for "an English poem and a Tamil poem, composed independently." The model could see its own English output while writing the Tamil one, and despite explicit instructions not to, it produced a Tamil poem that was essentially a line-by-line translation.
  • Attempt 2 two fully blind calls, so the Tamil generation never saw the English poem at all. This killed the translation problem, but caused a new one: without any grounding, the model sometimes lost track of the actual image, or fell into repeating the same phrase across stanzas.
  • Attempt 3 the one that worked: generate the English poem first, then pass it into the Tamil call as interpretive context ("here's one reading of what this image means") with explicit instructions to adapt the emotional core into natural, fluent Tamil not translate it, not copy its wording. That single change was the difference between a Tamil poem that was technically correct but empty, and one that read like it was thought in Tamil to begin with.
Along the way I also learned to prioritize grammatical clarity over forcing a dense, classical register pushing the model too hard toward compressed literary Tamil produced text that sounded poetic but stopped making sense. Clear and natural beat "impressively compressed but broken" every time.

AWS services used / architecture overview

  • Amazon Bedrock (Nova Lite) the actual poem generation, via two  converse()  calls per photo (image + text prompt in, poem text out).
  • AWS IAM least-privilege access throughout: a scoped IAM user for local development, and a separate instance role for the deployed service, each granted only  bedrock:InvokeModel .
  • AWS App Runner hosts the deployed app directly from a GitHub repo. Push to  main , and App Runner rebuilds and redeploys automatically, using the checked-in  apprunner.yaml  for build/run config.
Photo upload (Gradio UI, hosted on App Runner)
│
▼
Call 1: image + English style sample
│
▼
Amazon Nova Lite (Bedrock) → English poem
│
▼
Call 2: image + Tamil style sample + English poem (as context, not to translate)
│
▼
Amazon Nova Lite (Bedrock) → Tamil poem
│
▼
Both poems shown in the UI
The app uses boto3's default credential chain rather than hardcoded keys or profiles, so the exact same  app.py  runs unchanged locally (my IAM user) and in production (App Runner's instance role) one code path, no environment-specific branches.

What I learned

Two things, one technical and one not.
Technically: prompt architecture matters as much as prompt wording. The single biggest quality jump didn't come from a cleverer instruction it came from restructuring what the model could see at each step (splitting one call into two, then selectively re-introducing context). No amount of "please don't translate this" fixed a problem that the call structure itself was causing.
Personally: I hadn't written a Tamil poem in a long time before this project. Building something that forced me to sit with my own style samples and judge whether the output actually sounded like me was, unexpectedly, the nudge I needed to notice that gap and start closing it.

Link to app or repo


Any opinions in this article are those of the individual author and may not reflect the opinions of AWS.
Enjoyed reading this content? Let the author know!

Your likes, comments, shares, and saves help creators reach more builders.

Loading recommendations

Loading article