Poetry Meets AI: Creating a Haiku Generator with Python Flask and Gemini

We will be creating a web app, which will help the user input a theme. And the AI will generate a haiku poem based on the theme. A haiku is a type of poem that originated in Japan, which has seventeen syllables.

A web app consists of a Front End and Back End. Everything and anything the user is able to see, the User Interface (UI), the input box for the theme, the submit button, and the generated poem is Front End.

Back End is also the process that happens behind the scenes that is hidden from the end user. Like connecting to the Gemini API, receiving the theme in an endpoint, and generating a response from the AI, returning it back to the Front End.

For our Front End we will be using plain old HTML, CSS, and Javascript. No fancy front-end frameworks like React or Angular.

The Back End will be built using Python as the language and Flask as the web framework and integrate Google's Gemini LLM for AI capabilities.

When developing web apps, there are two architectural approaches:

Write a comment ...

Vishnu Dileesh

Show your support

Hey there! 👋 I love sharing my coding journey, insights, and tutorials to help fellow developers grow. If you've found my content valuable, consider supporting my work! Your contributions help me keep creating quality content, explore new topics, and share more useful resources with the community. Thanks for your support! ❤️

Write a comment ...