|
--- |
|
title: Ugly Holiday Card Generator |
|
emoji: π¦ |
|
colorFrom: gray |
|
colorTo: gray |
|
sdk: streamlit |
|
sdk_version: 1.39.0 |
|
app_file: app.py |
|
pinned: false |
|
license: mit |
|
short_description: Generate an ugly hold |
|
--- |
|
|
|
π **Ugly Holiday Card Generator** π |
|
|
|
π **Welcome to the Ugly Holiday Card Generator!** πβοΈ |
|
|
|
This fun and festive app allows you to create your own ugly holiday cards using AI-generated borders, custom messages, and creative controls to make your card as unique (and ugly!) as possible. Powered by Flux models on Fireworks AI, this app helps you get creative with your holiday greetings. π
πβ¨ |
|
|
|
## π― **Project: Ugly Holiday Card Generator** |
|
|
|
### π οΈ **Overview** |
|
The **Ugly Holiday Card Generator** is an interactive tool built with **Streamlit** that allows users to upload images, adjust parameters, and generate customized holiday cards with AI-generated borders. Whether you want to add snowflakes, Christmas lights, or even fireworks, this app lets you craft the perfect holiday card to share with your friends and family! π |
|
|
|
### π¨ **Features** |
|
- **Custom Borders**: Choose from a variety of holiday-themed prompts like festive snowflakes, cozy fireplaces, and colorful fireworks! Or create your own custom border prompt! πΌοΈπ |
|
- **Crop It**: Adjust your imageβs crop to focus on the best part of your photo. βοΈ |
|
- **Personalized Message**: Add your own holiday message in different fonts and sizes to give it that final personal touch. βοΈπ |
|
- **Save & Download**: Easily download your masterpiece with just a click and share it with the world! ππ |
|
|
|
### π **App Structure** |
|
The app is divided into two parts: |
|
|
|
1. **Prompt & Parameter Ideation**: |
|
- Select or enter custom prompts for your holiday card's border. |
|
- Adjust advanced parameters like **guidance scale** and **inference steps** to fine-tune your card. |
|
- Crop your image and preview your card before moving to the final stage. ππΈ |
|
|
|
2. **Personalization & Message Customization**: |
|
- Add a custom holiday message with a variety of fonts and sizes. |
|
- View the final card with your personalized message and download it in PNG format. πΌοΈπ |
|
|
|
### π» **Setup and Installation** |
|
|
|
#### π **Prerequisites** |
|
- **Python 3.x** installed on your machine. |
|
- A **Fireworks AI** API key, which you can obtain by signing up at [Fireworks AI](https://fireworks.ai). |
|
- Install **Streamlit** and the **Fireworks Python Client**. |
|
|
|
#### π₯ **Step-by-Step Setup** |
|
|
|
1. **Clone the Repository**: |
|
```bash |
|
git clone https://github.com/fw-ai/examples.git |
|
``` |
|
|
|
2. **Navigate to the Specific Project Sub-directory**: |
|
```bash |
|
cd learn/inference/ugly-holiday-card-generator |
|
``` |
|
|
|
3. **Set up a Virtual Environment** (Optional but Recommended): |
|
```bash |
|
python3 -m venv venv |
|
source venv/bin/activate # On macOS/Linux |
|
.\venv\Scripts\activate # On Windows |
|
``` |
|
|
|
4. **Install Required Dependencies**: |
|
```bash |
|
pip install -r requirements.txt |
|
``` |
|
|
|
5. **Configure the `.env` File**: |
|
Copy the `.env.template` file and rename it to `.env` in the project directory: |
|
```bash |
|
cp .env.template env/.env |
|
``` |
|
Add your **FIREWORKS_API_KEY**: |
|
```bash |
|
FIREWORKS_API_KEY=<your_fireworks_api_key> |
|
``` |
|
|
|
6. **Run the Streamlit App**: |
|
```bash |
|
streamlit run app.py |
|
``` |
|
|
|
7. **Explore the App**: |
|
- Open the app in your browser via the URL provided by Streamlit (typically `http://localhost:8501`). |
|
- Navigate between the prompt ideation and message customization stages. β¨π¨ |
|
|
|
### π **Example Prompts** |
|
Here are some example holiday prompts to try in the app: |
|
- "A border of festive snowflakes and winter patterns" |
|
- "A border of cozy Christmas ornaments and lights" |
|
- "A border of New Year's Eve fireworks with stars and confetti" |
|
|
|
### π **Fireworks API Documentation** |
|
To learn more about querying models and interacting with the Fireworks API, check out the [Fireworks API Documentation](https://docs.fireworks.ai/api-reference). |
|
|
|
### π€ **Contributing** |
|
Contributions are welcome! Feel free to fork the repository, make changes, and submit a pull request. π¨π |
|
|
|
### π **License** |
|
This project is licensed under the MIT License. |
|
|
|
π **Happy Holidays and Enjoy Creating Your Cards!** π |