https://github.com/raheesahmed/ai-image-generator
The AI Image Generator is a robust Node.js application utilizing the Express.js framework. This application leverages OpenAI's DALL-E 3 model to generate images based on user inputs, creating a seamless and interactive experience.
https://github.com/raheesahmed/ai-image-generator
dalle-3 express nodejs openai
Last synced: 2 months ago
JSON representation
The AI Image Generator is a robust Node.js application utilizing the Express.js framework. This application leverages OpenAI's DALL-E 3 model to generate images based on user inputs, creating a seamless and interactive experience.
- Host: GitHub
- URL: https://github.com/raheesahmed/ai-image-generator
- Owner: RaheesAhmed
- License: mit
- Created: 2024-01-08T20:37:47.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-02-16T01:17:27.000Z (over 1 year ago)
- Last Synced: 2024-12-25T13:41:15.572Z (10 months ago)
- Topics: dalle-3, express, nodejs, openai
- Language: HTML
- Homepage:
- Size: 8.61 MB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: ReadMe.MD
- License: LICENSE
Awesome Lists containing this project
README
# AI Image Generator

## Overview
The AI Image Generator is a robust Node.js application utilizing the Express.js framework. This application leverages OpenAI's DALL-E 3 model to generate images based on user inputs, creating a seamless and interactive experience.
## Key Features
- **Image Generation**: Utilizes the DALL-E 3 model to generate images from textual descriptions.
- **User Input Handling**: Accepts and processes user inputs to create customized image prompts.
- **API Integration**: Seamlessly integrates with OpenAI's API for advanced image generation capabilities.
- **Data Persistence**: Stores user details in a CSV file for record-keeping and analytics.## Technologies Used
- Node.js
- Express.js
- Multer
- OpenAI's DALL-E 3
- Dotenv for environment management## Installation and Setup
Ensure you have Node.js and Visual Studio Code installed on your machine. If not, follow these instructions:
1. **Node.js Installation**: Download and install Node.js from [here](https://nodejs.org/en/download/).
2. **VS Code Installation**: Download and install Visual Studio Code from [here](https://code.visualstudio.com/download).Once the installations are complete, proceed with the following steps:
1. Clone the Repository:
```bash
git clone https://github.com/RaheesAhmed/ai-image-generator.git```
1. Clone the repository: `git clone https://github.com/RaheesAhmed/ai-image-generator.git`
1. Install dependencies: Run `npm install` in the project directory.
1. Create a `.env` file in the project directory and add your OpenAI API key:
```plaintext
OPENAI_API_KEY=your-api-key
```1. Start the server: Run `npm start` in the project directory.
1. Access the app: Open your web browser and go to [http://localhost:3000/](http://localhost:3000/).
## Customization
To customize the prompt used in the application, follow the steps below:
1. Open the `index.js` file in your project directory.
2. Find the following line of code:
```javascript
app.post("/generate-images", upload.none(), async (req, res) => {
const prompt = `Create a cinematic still in 32k resolution and landscape format depicting ${mainScene}, located at ${location}. The main character is ${mainCharacter}. Additional characters include ${additionalCharacters}. ${additionalInfo}`;
});
```3. Modify the `prompt` variable as needed.
## Developed By
Rahees Ahmed