This project is an AI image generator that uses the Hugging Face API to generate images based on user input. The project is built using React, Express, and Node.js.
Clone the repository using the following command:
git clone "https://github.com/sadiqhussain13/ai-image-generator.git"
cd ai-image-generator
Install the necessary dependencies using the following command:
npm install
Create a .env
file in the root of the project and add the following environment variable:
REACT_APP_HUGGINGFACE_API=YOUR_API_KEY
Replace YOUR_API_KEY
with your actual Hugging Face API key.
Start the backend server using the following command:
npm run start:backend
This will start the Express server on port 8000.
Start the frontend server using the following command:
npm run start:frontend
This will start the React development server on port 3000.
Open the application in your web browser by navigating to http://localhost:3000.