Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

DALLE2 in the command line.

License

NotificationsYou must be signed in to change notification settings

alxschwrz/dalle2_python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.gitcd dalle2_pythonpip3 install -r requirements.txt

Run example

python3 dalle2_python.pyWhat image should dalle create: if running late for class was an animal, digital artGenerated image stored in: ./output/if running late for class was an animal, digital art_0.pngGenerated 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_terminalexample_of_prompt_in_terminal

Enjoy!

Releases

No releases published

Packages

No packages published

Languages


[8]ページ先頭

©2009-2025 Movatter.jp