Coder Social home page Coder Social logo

joshuadeal / dall-e-cli Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 0.0 4.04 MB

Simple python script to interface with openai's api for dall-e-2 and dall-e-3.

License: GNU General Public License v3.0

Python 100.00%
ai cli command-line command-line-interface command-line-tool dall-e dall-e-3 dall-e-api dall-e2 dall-e3

dall-e-cli's Introduction

Dall-E-cli

A simple python script for interfacing with dall-e-2 or dall-e-3 in the command line.

Usage

dall-e-cli.py --help

dall-e-cli.py
Usage:  dall-e-cli.py --[option]
Options:
        --help                  Display this help message.
        --prompt "prompt"       Specify the prompt.
        --model <model>         Specify what model to use.
        --size <size>           Specify image size.
        --quality <quality>     Specify image quality.
        --output <file name>    Specify where to save the image.

Examples

Try running dall-e-cli.py -p "Anime style. A young female programmer testing her code for bugs." -o ./output.png -m dall-e-3 The program will wait for a short period of time and after it finishes a new file called "output.png" will be created in the working directory. The resulting image should look something like the following.

This image is an example.

Also, try dall-e-cli.py -p "Grassy green hills under a bright blue sky." A new file called "dalle-image.png" will be created in the working directory. It should be somewhat similar to the following.

This image is an example.

Dependencies

The following are dependencies that you may need to install.

  • openai

Installation / Configuration

Installation

  1. Clone this git repository.

    git clone https://github.com/joshuadeal/dall-e-cli

  2. Change to repository directory.

    cd ./dall-e-cli/

  3. Install dependencies.

    python -m pip install -r ./requires.txt

Configuration

  1. You'll need to set up the OPENAI_API_KEY evnironmental variable.

    1. echo "export OPENAI_API_KEY='put your api key here'" >> ~/.bashrc"
    2. source ~/.bashrc

    To test if this has been done correctly run echo $OPENAI_API_KEY. The output should be your API key.

dall-e-cli's People

Contributors

joshuadeal avatar

Stargazers

 avatar

Watchers

 avatar  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.