Create a Poem With Your Own Words - AI Poem Generator

Start with this template
162
import os
from flask import Flask, request, render_template_string
from abilities import llm_prompt

app = Flask(__name__)

TEMPLATE = '''
<!doctype html>
<html>
<head>
    <title>Cupid Poem Generator</title>
    <style>
        body {
            font-family: 'Futura', sans-serif;
            margin: 0;
            padding: 0;
            background: linear-gradient(to right, #ff0000 0%, #ff758c 100%);
            text-align: center;
            color: white;
        }
        h1 {
            margin-top: 50px;
            font-size: 4em; /* Adjusted the font size to be a bit smaller */
Get full code

Create a Poem With Your Own Words - AI Poem Generator

Created: | Last Updated:

Introduction to the Valentine's Name Poet Template

Welcome to the Valentine's Name Poet template guide. This template allows you to create a charming web application that generates personalized romantic poems. Users can input details such as the name of their Valentine, interests, memories, pets, appearance, and a question to craft a unique poem for their loved one. This template is perfect for those looking to build a fun and interactive experience without worrying about the complexities of deployment and environment setup.

Getting Started

To begin using this template, simply click on "Start with this Template" on the Lazy platform. This will pre-populate the code in the Lazy Builder interface, so you won't need to copy, paste, or delete any code.

Test: Deploying the App

Once you have the template loaded, press the "Test" button to start the deployment process. The Lazy platform will handle all the necessary steps to get your application up and running. If the code requires any user input, you will be prompted to provide it through the Lazy CLI interface after pressing the "Test" button.

Entering Input

After pressing the "Test" button, if the application requires user input, the Lazy CLI will prompt you to enter the necessary details. This input will be used to generate the personalized poem within the application.

Using the App

Once deployed, the application will present a user-friendly interface where users can fill out a form with the details of their Valentine. After submitting the form, a customized poem will be generated and displayed on the screen. The interface is designed with a romantic theme, complete with a color gradient background and stylized fonts to set the mood for Valentine's Day.

Integrating the App

If you wish to integrate this poem generator into an external service or frontend, you may need to use the server link provided by the Lazy platform. This link can be added to your external tool to allow users to access the poem generator directly from your service. Additionally, if you're using an API, Lazy will provide you with a dedicated server link to interact with the API, and in the case of FastAPI, a documentation link as well.

Remember, no additional setup for the 'abilities' module is required, as it is a built-in module within the Lazy platform. Enjoy creating a delightful experience for users with the Valentine's Name Poet template!

Technologies

OpenAI OpenAI