🌌 DreamCanvas: AI-Powered Text-to-Image Generator
DreamCanvas is a lightweight, web-based AI image generator that transforms text prompts into stunning visuals using the Hugging Face Inference API. Built with HTML, CSS, and JavaScript, it offers a smooth user experience with powerful customization options and intuitive UI features like image download and clipboard copy.
🚀 Features
- 🎨 Text-to-Image Generation: Convert natural language prompts into AI-generated images.
- 🧠 Powered by Hugging Face: Utilizes Hugging Face’s API for high-quality image synthesis.
- 🛠️ Customizable Inputs: Adjust prompts, styles, and resolution settings.
- 💾 One-Click Image Download: Save your creations instantly.
- 📋 Copy to Clipboard: Copy generated images directly for quick sharing.
- 📱 Responsive Design: Optimized for desktops, tablets, and mobile devices.
📸 Demo
⚙️ Tech Stack Frontend: HTML, CSS (responsive design), JavaScript
API: Hugging Face Inference API:
https://huggingface.co/inference-api
🧪 How It Works
-
User enters a text prompt.
-
The app sends the prompt to Hugging Face’s image generation model via their API.
-
The generated image is displayed on the page.
-
Users can download the image or copy it to the clipboard with a single click.
🔧 Setup & Installation
- Clone the repository:
git clone https://github.com/your-username/dreamcanvas.git
cd dreamcanvas
- Open index.html in your browser.
Add your Hugging Face API key in the JavaScript file:
Copy code
const API_TOKEN = 'your_huggingface_api_key'
4.📷 Screenshots
🖼️ Prompt Input and Result https://github.com/aditiisinha/ai-image-generator/blob/main/Screenshot1.png

