- Notifications
You must be signed in to change notification settings - Fork3
One-line Image Generating Program Based on the Bing Image Createor (Powered by DALL·E 3), `pip install bing_brush`, that's it!
vra/bing_brush
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Credit: The solution of invoking Bing Image Creator API is fromhttps://github.com/acheong08/BingImageCreator.
pip install bing_brush
The cookie of Bing.com is needed. You need to login to Bing.com first, then follow the steps below to write your cookie to a file (e.g.,cookie.txt
):
Visthttps://www.bing.com/images/create
Press F12 to open dev tools, then refresh the web page to run all requests again:
Select any rquest with type of xhr, then click the head of the requestIn the detail of the request header, find theCookie
section, copy the value of it to your file (e.g., cookie.txt)
# -c is short for --cookie, -p is short for --promptbing_brush -c cookie.txt -p'a cute panda eating bamboos' -o output_folder
This command will generate 4 pictures located inoutput_folder
, example outputs:
brush=BingBrush(cookie='/path/to/cookie.txt')brush.process(prompt='a cute panda eating bamboos',out_folder='output_folder')
- unit test
- support for obtaining cookie from os.env
Logo of this project is generated by Bing Image, prompt:
A minimalist logo vector image, square-shaped, with a magical brush implemented in Python language in the center, colorful, digitial art