Skip to content

This is a simple React app that generates a photo based on text input using the OpenAI API.

License

Notifications You must be signed in to change notification settings

ajee10x/OpenAI-Photo-Generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OpenAI-Photo-Generator

This is a simple React app that generates a photo based on text input using the OpenAI API.

Installation

  1. First, let's create a new React project using create-react-app by running the following command in your terminal:
  • npx create-react-app my-app
  • This will create a new React project called my-app in your current directory.
  1. Next, let's install the axios library by running the following command in your terminal inside the my-app directory:
  • npm install axios
  1. Now, let's create a new component called src/PhotoGenerator.js that will be responsible for generating photos based on user input.
  2. Create an account on the OpenAI website and obtain an API key. https://platform.openai.com/account/api-keys
  3. Finally, let's update our App component to render our PhotoGenerator component by editing src/App.js insdie the dictionary.
  4. Replace the placeholder API key in src/App.js with your own API key.
  • const apiKey = 'YOUR_API_KEY_HERE';
  1. Start the app using:
  • npm start

Usage

  1. Enter a prompt in the input field.
  2. Click the "Generate Photo" button.
  3. Wait for the photo to be generated and displayed.

Technologies Used

  • React
  • OpenAI API License This project is licensed under the MIT License. See the LICENSE file for more details.

Screenshot

This is an image

License

MIT license.

About

This is a simple React app that generates a photo based on text input using the OpenAI API.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published