Code Monkey home page Code Monkey logo

dalle2_python's Introduction

๐Ÿ“ธ dalle2_python ๐Ÿž

Generating stunning images from the command line.

This is a simple working example on how to integrate the DALLE2 API into your own Python project and create amazing images directly from the command line.

How it works

Reads a string from the command line in natural language and creates an input prompt which is then fed to OpenAIs DALLE2. The response contains urls to the generated images. The images are downloaded and stored in an output folder. To generate your own images you need to get access to the DALLE2 API (https://openai.com/dall-e-2/).

Installation

git clone https://github.com/alxschwrz/dalle2_python.git
cd dalle2_python
pip3 install -r requirements.txt

Run example

python3 dalle2_python.py
What image should dalle create: if running late for class was an animal, digital art
Generated image stored in: ./output/if running late for class was an animal, digital art_0.png
Generated image stored in: ./output/if running late for class was an animal, digital art_1.png

Now check the output folder:

example_of_prompt_in_terminal example_of_prompt_in_terminal

Enjoy!

dalle2_python's People

Contributors

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