AI Image Generator is a modern React-based web application that transforms text prompts into AI-generated images. Users can either write their own prompt or generate a random creative prompt with a single click. The application sends the prompt to an AI image generation model through the Hugging Face Inference API and displays the generated image instantly in a clean, responsive interface.
- Generate AI images from text prompts
- Random prompt generator for inspiration
- Fast image generation using the Hugging Face API
- Real-time image preview
- Responsive and user-friendly interface
- Loading indicator during image generation
- Custom prompt input support
- React.js
- JavaScript (ES6+)
- Tailwind CSS
- Hugging Face Inference API
- Fetch API
- Enter a text prompt or generate a random one.
- Click the Generate Image button.
- The application sends the prompt to the AI model via the Hugging Face API.
- The generated image is displayed instantly on the screen.
This project demonstrates API integration, asynchronous data fetching, React state management with Hooks, and building a responsive AI-powered user interface.