An open API service indexing awesome lists of open source software.

https://github.com/eternalflame02/ai-poem-crafter

This Streamlit-based web app allows users to generate custom poems using AI. By selecting a mood, poem length, and optional theme, users can craft unique poems and download or copy them to their clipboard. The app utilizes the AwanLLM API for natural language generation.
https://github.com/eternalflame02/ai-poem-crafter

ai awan poem-generator python streamlit streamlit-webapp

Last synced: 2 months ago
JSON representation

This Streamlit-based web app allows users to generate custom poems using AI. By selecting a mood, poem length, and optional theme, users can craft unique poems and download or copy them to their clipboard. The app utilizes the AwanLLM API for natural language generation.

Awesome Lists containing this project

README

        

# AI Poem Crafter โœจ๐Ÿ“

**AI Poem Crafter** is a creative web app that generates beautiful poems using the **AwanLLM API**! ๐ŸŽค๐ŸŽถ Whether you're in the mood for a happy, sad, or nostalgic poem, this app allows you to customize the mood, length, and even theme to create a unique piece of art. ๐ŸŒŸ

### Key Features ๐ŸŒŸ
- **Generate Poems**: Select a mood, length, and theme (optional) to generate a personalized poem. ๐Ÿ–‹๏ธ
- **Poem History**: Keep track of all your generated poems with titles, moods, and content. ๐Ÿ“œ
- **Download Poems**: Download your poems as text files with the title as the filename. ๐Ÿ’พ
- **Copy to Clipboard**: Easily copy any poem to your clipboard for sharing. ๐Ÿ“‹
- **Clear History**: Reset your poem history with a single click. ๐Ÿงน

---

## How to Use ๐Ÿ’ก

1. **Choose Your Poem Settings**:
- Select a **mood** (e.g., Happy, Sad, Romantic, etc.)
- Choose your **poem length** (Short, Medium, or Long).
- Optionally, enter a **theme** or keywords.

2. **Generate Your Poem**: ๐Ÿ“
- Click the **"Generate Poem"** button and wait as the AI crafts your masterpiece! โœจ

3. **Poem History**: ๐Ÿ›๏ธ
- View all the poems you've created, with the option to expand them for full reading.

4. **Download or Copy**: ๐Ÿ”ฝ
- **Download** poems as `.txt` files or **copy** them directly to your clipboard for easy sharing.

5. **Clear History**: ๐Ÿงน
- Use the **"Clear Poem History"** button to reset all your poem data.

---

## Requirements ๐Ÿ“ฆ

- Python 3.7+ ๐Ÿ
- **Streamlit** ๐Ÿ“Š
- **Requests** ๐Ÿ”Œ
- **Pyperclip** ๐Ÿ“‹

---

## Installation โš™๏ธ

1. **Clone the repository**:
```bash
git clone https://github.com/eternalflame02/AI-Poem-Crafter.git
```

2. **Install dependencies**:
```bash
pip install -r requirements.txt
```

3. **Run the app locally**:
```bash
streamlit run poemcrafter.py
```

---

## Deploy to Streamlit Cloud โ˜๏ธ

1. Sign in to your **Streamlit** account [here](https://streamlit.io).
2. Go to your dashboard and click **"New app"**.
3. Connect your **GitHub repository** and deploy the app.
4. **Set your API_KEY** as a secret in Streamlit Cloud:
- In **Streamlit Cloud**, navigate to **Settings** > **Secrets** and add your **API_KEY**.
- Example:
```toml
[secrets]
API_KEY = "your-api-key-here"
```

---

## Contributing ๐Ÿค

I welcome contributions! Feel free to fork the repo, create branches, and submit pull requests.

---

## License ๐Ÿ“œ

This project is licensed under the **MIT License**. See the [LICENSE](LICENSE) file for details. ๐Ÿ“„

---

Thanks for checking out **AI Poem Crafter**! ๐ŸŒŸ

---