Sitemap
Lcarpenter

Lcarpenter

Festive Build Part 1: The Idea & Planning

3 min readDec 11, 2025

--

Holiday season 2025 can only mean it’s time to build a festive fun project to bring cheer. Last year was roasting roast dinners, this year we turn to another festive tradition — wrapping. Let’s leverage a year of incredible development and paradigm shifts in the world of Generative AI to build an end-to-end generative AI powered app on Google Cloud with Vertex AI.

Press enter or click to view image in full size
AI Generated image of a grumpy Elf ready to rate the wrapping!

The Idea

Wrap Rater: A cost effective streamlit web-app that will allow a user to upload an image a wrapped present, and receive a ‘score’ with a light roasting — for added fun the system will also guess what is wrapped.

The Plan

  • Model: We’ll use something in the Gemini family — and will need to experiement with different models. Flash is going to have a lower latency and be cheaper but Pro will do a better job of rating/roasting. We need to find the balance and evaluate the different model outputs.
  • Frontend: Streamlit. Why? Rapid development, Python-native, and looks professional with minimal CSS work. For a seasonal dev project this is perfect.
  • IDE: Until we’re ready for hosting, we’ll use AntiGravity!
  • Hosting: Google Cloud Run. Why? Serverless, scales to zero so fits our low cost need, and is the “gold standard” for containerised Python apps.
  • Orchestration: Vertex AI SDK for Python.

Get Lcarpenter’s stories in your inbox

Join Medium for free to get updates from this writer.

Project Considerations

  • The Persona (System Instruction): We don’t want a boring app with no personality, we want fun and wit. We’ll use Role-Prompting — that’s giving the bot a role and personality that allows it to respond with flair and cheek.
  • Safety Settings: Gemini Models have safety as a built in feature. We’ll need to utilise these to ensure the roasting remains light-hearted. As always, balance is needed here.
  • Image Handling: We’ll use st.file_uploader but won't save files locally. We should be able to pass the bytes directly to Vertex AI to keep the container stateless and secure.
  • Latency Management: We want streamlit to feel responsive we’ll use Streamlit's st.spinner() and asynchronous calls where possible.
  • Cost Control: We’re going to implement a simplistic "rate limit" prevent a user from mashing the "Roast" button 50 times — and we’ll also set budgets and a quota on the api-keys to keep spends within our budget!
  • Response Streaming: We’ll use Gemini's stream=True capability alongside Streamlit’s stream writing to print the roast word-by-word. It feels much faster and more "AI-like" to the user.
  • Evaluation: To see how well we’re performing, we’ll use streamlit’s st.feedback() to ask if it was a good response or not, and we’ll log this back on to Google Cloud — for some RLHF (Reinforcement Learning from Human Feedback) data collection.

Next Steps

We’ll move over to Vertex AI Studio to write our prompt, build our persona and start to bring our judgemental elf to life! Join for Part 2 to follow the process!

--

--