karayamanemre / gpt-rails

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

openai-rails

  • This is a web application that allows users to generate an image and a text based on a given prompt. The application uses OpenAI's GPT-3 language model to generate a text response to the prompt, and then uses that response as an input to generate an image using OpenAI's DALL-E image generation API. The application is built using the Ruby on Rails framework and includes a user interface that allows users to enter a prompt, generate an image based on that prompt, and view the resulting image along with the text response. The application requires an OpenAI API key, which must be provided by the user in order to use the application.

Installation

  1. Clone the repository:
git clone https://github.com/karayamanemre/gpt-rails.git
  1. Install the required gems:
bundle install
  1. Create a .env file in the root directory of the project and add your OpenAI API key:
OPENAI_API_KEY=your-api-key
  1. Start the Rails server:
rails server
  1. Visit http://localhost:3000 in your web browser to see the app in action.

Usage

  1. Type some text into the input field on the home page and click "Generate".
  2. Wait for the text and images to be generated.
  3. Click "Copy Text" to copy the generated text to your clipboard.

About

License:MIT License


Languages

Language:Ruby 69.6%Language:HTML 26.2%Language:JavaScript 3.5%Language:Shell 0.3%Language:CSS 0.3%Language:SCSS 0.2%