An extraordinarily advanced AI image generation suite powered by Google Gemini.
Transforming imagination into reality, one masterpiece at a time.
DreamCanvas is more than just a text-to-image appβit's a creative partner. As my first project using the Google Gemini API, it began as a learning experiment and grew into a feature-rich, artist-friendly AI art studio with an ethereal cosmic aesthetic.
| Feature | Description |
|---|---|
| Gemini-Powered | Uses gemini-2.0-flash-exp-image-generation for stunning image quality. |
| Massive Style Library | 300+ styles across 20+ themes like Classical, Vaporwave, Cyberpunk, etc. |
| Advanced Controls | Customize aspect ratio, color mood, lighting, temperature, and more. |
| Negative Prompting | Eliminate unwanted elements from your output. |
| Mood Presets | One-click aesthetic vibes like "Dreamy", "Gothic", "Fantasy", and more. |
| Prompt Auto-Enhance | Enriches your text prompts with intelligent enhancements. |
| "Surprise Me!" Button | Context-aware random prompt generator. |
| Image Variations | Create fresh takes on existing images with one click. |
| Utility | Function |
|---|---|
| βΎοΈ 4x Image Upscaler | Boost resolution by 4x while preserving detail. |
| Outpaint images to expand the canvas naturally. | |
| πΌοΈ Image-to-Prompt | Extract descriptive prompts from uploaded images. |
| π¬ Chat with Image | Converse with the AI about any image's style, elements, or meaning. |
| π¨ Color Palette Extractor | Extract beautiful palettes with hex codes from images. |
| ποΈ B&W Image Colorizer | Add life to grayscale images with vivid color. |
| βοΈ Pencil Sketch | Turn images into delicate pencil-style sketches. |
| πΎ Glitch Art Generator | Apply custom glitch effects for a retro vibe. |
| π° Halftone Effect | Recreate a classic newspaper print effect. |
| π ASCII Art Generator | Convert images into mesmerizing ASCII art. |
| βοΈ Background Remover | Automatically remove the background from an image. |
| Feature | Description |
|---|---|
| Persistent Database | Local data storage via TinyDB for gallery, favorites, and history. |
| Advanced Filtering | Search across history and favorites by style, keyword, or time. |
| Cosmic UI | Glass morphism + animation + dreamy color palette for a magical experience. |
| Text-to-Speech | Play audio descriptions of AI-generated art. |
| Export Options | Download as PNG, JPG, WebP, or with JSON metadata. |
| Tech | Purpose |
|---|---|
| Python | Core logic |
| Streamlit | Interactive frontend |
| Google Gemini API | Image generation engine |
| Pillow (PIL) | Image manipulation |
| TinyDB | Local persistent storage |
| NumPy + Scikit-learn | Palette analysis and color clustering |
| gTTS | Google Text-to-Speech integration |
| HTML/CSS | Beautiful, custom cosmic-themed UI |
- Python 3.9+
- A valid Google Gemini API key
git clone https://github.com/your-username/DreamCanvas.git
cd DreamCanvas
# Create virtual environment (recommended)
python -m venv venv
# For Windows:
./venv/Scripts/activate
# For macOS/Linux:
source venv/bin/activate
# Add dependencies
echo streamlit > requirements.txt
echo google-generativeai >> requirements.txt
echo Pillow >> requirements.txt
echo tinydb >> requirements.txt
echo numpy >> requirements.txt
echo scikit-learn >> requirements.txt
echo gTTS >> requirements.txt
# Install libraries
pip install -r requirements.txtCreate .streamlit/secrets.toml file:
gemini_api_key = "YOUR_API_KEY_HERE"streamlit run app.pyThen open in your browser β¨
DreamCanvas is my first journey into the world of text-to-image generation. It's more than a demoβit's a love letter to creativity and AI, built to feel like an intuitive art companion. From prompt engineering to gallery storage, every detail was hand-crafted and custom-coded to make this experience magical and memorable.
A big thank you to:
- Google for the Gemini API
- The Streamlit team for such an amazing open-source tool
Open to contributions and feedback! Please check the issues page to get started.
This project is under the MIT License.