Skip to content

AI-Image-Generator: A Next.js app that uses AI models to generate images from text prompts and extract text from images.

Notifications You must be signed in to change notification settings

fernandonavarro-dev/next-stablediffusion-gpt3.5

Repository files navigation

AI-Powered Image Generator with Next.js and Tailwind CSS

Overview

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.

Features

  • 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

Getting Started

To run the project locally, follow these steps:

  1. Clone the repository:

git clone https://github.com/yourusername/nextjs-tailwind-stablediffusion-gpt3.git

  1. Change to the project directory:

cd nextjs-tailwind-stablediffusion-gpt3

  1. Install the dependencies:

npm install

  1. 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

  1. Run the development server:

npm run dev

  1. Open your browser and visit http://localhost:3000 to see the app.

Building and Deploying

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.

Contributing

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.

License

This project is licensed under the MIT License.

About

AI-Image-Generator: A Next.js app that uses AI models to generate images from text prompts and extract text from images.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published