This project is a Next.js app that integrates Tailwind CSS for styling, the Stable Diffusion API for generating images from text, the GPT-3.5 Turbo API for providing a chat assistant to help users with their prompts, and the Google Cloud Vision API for generating text descriptions from images. The application allows users to input text prompts and generates images based on the provided prompts. It showcases the integration of generative AI models for creative purposes within an intuitive and user-friendly interface.
- Next.js for server-rendered React applications
- Tailwind CSS for rapid UI development
- Stable Diffusion API integration for generating images
- GPT-3.5 Turbo API integration for chat assistant functionality
- Google Cloud Vision API integration for generating text descriptions from images
- Responsive design
- Integrated ChatGPT Assistant for guidance and suggestions on prompt engineering, via floating chat button and chatbox
- Display of the last 10 generated images in a grid layout
- Ability to delete individual images from the generated images array
- Expandable and collapsible Image to Text form for converting images to text descriptions
To run the project locally, follow these steps:
- Clone the repository:
git clone https://github.com/yourusername/nextjs-tailwind-stablediffusion-gpt3.git
- Change to the project directory:
cd nextjs-tailwind-stablediffusion-gpt3
- Install the dependencies:
npm install
- Create a
.env.local
file in the root folder and add your API keys for Stable Diffusion, GPT-3.5 Turbo, and Google Cloud Vision:
NEXT_PUBLIC_STABLE_DIFFUSION_API_KEY=your_stable_diffusion_api_key NEXT_PUBLIC_OPENAI_API_KEY=your_openai_api_key NEXT_PUBLIC_GOOGLE_VISION_API_KEY=your_google_vision_api_key
- Run the development server:
npm run dev
- Open your browser and visit http://localhost:3000 to see the app.
To build the app for production, run:
npm run build
This command will generate a production-optimized build in the .next
folder. To start the production server, run:
npm run start
For deploying the app, refer to the Next.js deployment documentation for various hosting options.
If you would like to contribute to this project, feel free to submit a pull request. If you encounter any issues or have suggestions, please open an issue.
This project is licensed under the MIT License.