| title | Limerickster |
|---|---|
| emoji | ⌨️ |
| colorFrom | purple |
| colorTo | pink |
| sdk | docker |
| app_port | 7860 |
| pinned | false |
| short_description | Easily create a personalized limerick from a few details. |
| thumbnail | https://hayleyw7-limerickster.hf.space/static/og-image.jpg |
Turn a few details about someone into a custom five-line limerick—AABBA rhyme, playful and personal.
Try it: https://hayleyw7-limerickster.hf.space/
- Open the app and add a name, location, and pronouns (she/her, he/him, or they/them).
- Fill in three hobbies—they help drive the rhymes.
- Add anything else you like: pets, favorite food or drink, appearance, job, or other notes (inside jokes, a partner’s name, topics to skip, and so on).
- Pick a tone if you want—cheerful is the default; you can also choose wholesome, sarcastic, dramatic, absurd, or romantic.
- Generate. You get one limerick back—five lines, matched to what you entered.
| Layer | What |
|---|---|
| Language | Python 3.11 (Docker / Hugging Face Space); local dev may use 3.8+ |
| Web | Flask — server-rendered UI and a JSON API |
| Production server | Gunicorn |
| Frontend | Vanilla HTML, CSS, and JavaScript (Jinja templates, no React/Vue) |
| AI | Groq — OpenAI-compatible API; default model Llama 3.3 70B (llama-3.3-70b-versatile) |
| AI client | OpenAI Python SDK pointed at Groq’s base URL |
| Rate limiting | Flask-Limiter (in-memory store) |
| Config | Environment variables via python-dotenv (.env) |
| Hosting | Hugging Face Spaces — Docker SDK, port 7860 |
Generation is prompt-driven: the model returns structured JSON (limerick plus optional kit fields like rhyme bank and writing tips). Pronoun rules, tone, and a word ban are enforced in the system prompt in ai.py.
- Clone the repo and create a virtualenv (optional but recommended).
- Install dependencies:
pip install -r requirements.txt - Copy
.env.exampleto.envand set a free Groq API key from console.groq.com. - Start the dev server:
python app.py(defaults tohttp://127.0.0.1:8080).
Optional env vars: GROQ_MODEL, PORT, SITE_URL, RATE_LIMIT_GENERATE, RATE_LIMIT_DEFAULT.
The live app runs as a Docker Space on Hugging Face. scripts/deploy-all.sh pushes code and syncs secrets (HF token + GROQ_API_KEY). See Dockerfile and scripts/push-to-hf-space.sh for the container build.
Licensed under the GNU General Public License v3.0 (GPL-3.0).