Giter Club home page Giter Club logo

imagey's Introduction

My OpenAI Image Generator

This is a simple command-line application that uses the OpenAI API to generate images based on a given prompt.

Installation

  1. Clone this repository.
  2. Install the required dependencies by running pip install -r requirements.txt.

Usage

  1. Run the application by executing python imagey.py followed by the necessary arguments.
  2. The generated image will be saved in the images/ directory.

The application accepts the following arguments:

  • prompt: The prompt for image generation.
  • name: The name of the generated image.
  • --model: The model to use for image generation. Default is 'dall-e-3'.
  • --size: The size of the generated image. Default is '1024x1024'.
  • --quality: The quality of the generated image. Default is 'standard'.
  • --n: The number of images to generate. Default is 1.

Example usage:

python imagey.py "A painting of a glass of water on a table." "water_painting" --model "dall-e-3" --size "1024x1024" --quality "standard" --n 1

Note

Make sure to set your OpenAI API key in your environment variables before running the application.

Setting the OpenAI API Key

Before running the application, you need to set your OpenAI API key as an environment variable. Here's how you can do this:

For Bash and ZSH shells:

  1. Open your shell profile file (.bashrc, .bash_profile, or .zshrc) in a text editor.
  2. Add the following line to the file, replacing your_api_key with your actual OpenAI API key:
export OPENAI_API_KEY="your_api_key"
  1. Save the file and restart your shell.

imagey's People

Contributors

francojc avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.