A Streamlit-based web application that generates professional backgrounds for Microsoft Teams using AI. The application leverages multiple AI image generation models through Replicate and Google Cloud Vertex AI platforms.
- Generate custom backgrounds using AI models from:
- Replicate (Flux models, Photon, Ideogram-v2)
- Google Cloud Vertex AI (Imagen 3)
- Multiple aspect ratio support (16:9, 3:2, 1:1, etc.)
- Advanced customization options
- Direct download for Teams compatibility
- Docker support for easy deployment
- Python 3.11 or higher
- Docker (optional)
- Google Cloud Project with Vertex AI API enabled
- Replicate API account
Create a .env
file based on .env.example
:
# Google Cloud
GOOGLE_APPLICATION_CREDENTIALS=path_to_your_credentials.json
GOOGLE_PROJECT_ID=your-project-id
GOOGLE_LOCATION=us-central1
# Replicate
REPLICATE_API_TOKEN=your_replicate_token
- Clone the repository:
git clone https://github.com/yourusername/teams-background-generator.git
cd teams-background-generator
- Create a virtual environment and activate it:
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
- Install dependencies:
pip install -r requirements.txt
- Run the application:
streamlit run src/main.py
- Build and run using Docker Compose:
docker-compose up --build
The application will be available at http://localhost:8501
- Select an AI model from the dropdown menu
- Enter a description of the background you want to generate
- Adjust advanced settings if needed:
- Aspect Ratio
- Output Format
- Safety Level
- Style Strength
- Click "Generate Background"
- Download the generated image using the "Download for Teams" button
- Flux 1.1 Pro
- Flux Schnell LoRA
- Flux 1.1 Pro Ultra
- Flux Dev LoRA
- Photon
- Ideogram-v2
- Imagen 3
- Imagen 3 Fast
├── src/
│ ├── api/
│ │ ├── replicate.py
│ │ └── vertex.py
│ ├── utils/
│ │ └── config.py
│ └── main.py
├── docker-compose.yml
├── Dockerfile
├── requirements.txt
└── .env.example
Contributions are welcome! Please feel free to submit a Pull Request.
This project is released into the public domain under The Unlicense. See LICENSE.md
for more details.
- Streamlit for the web framework
- Replicate for AI model access
- Google Cloud Vertex AI for Imagen models