Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/vra/bing_brush
One-line Image Generating Program Based on the Bing Image Createor (Powered by DALL·E 3), `pip install bing_brush`, that's it!
https://github.com/vra/bing_brush
ai aigc bing bingimage-generator click dalle-3 dalle3 microsoft openai pip python requests stable-diffusion
Last synced: 7 days ago
JSON representation
One-line Image Generating Program Based on the Bing Image Createor (Powered by DALL·E 3), `pip install bing_brush`, that's it!
- Host: GitHub
- URL: https://github.com/vra/bing_brush
- Owner: vra
- Created: 2023-11-04T13:40:38.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-04-23T00:25:09.000Z (7 months ago)
- Last Synced: 2024-09-26T18:34:49.585Z (about 2 months ago)
- Topics: ai, aigc, bing, bingimage-generator, click, dalle-3, dalle3, microsoft, openai, pip, python, requests, stable-diffusion
- Language: Python
- Homepage: https://bing-brush.vercel.app
- Size: 4.13 MB
- Stars: 10
- Watchers: 4
- Forks: 2
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
### One-line Image Generating Program Based on the Bing Image Createor (Powered by DALL·E 3)---
Credit: The solution of invoking Bing Image Creator API is from .
## Installation
```bash
pip install bing_brush
```### Obtain your cookie
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`):
#### Step0:
Vist
#### Step1:
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 request#### Step2:
In the detail of the request header, find the `Cookie` section, copy the value of it to your file (e.g., cookie.txt)
Then your cookie for Bing.com has successfully be stored.## Usage
### CLI
```bash
# -c is short for --cookie, -p is short for --prompt
bing_brush -c cookie.txt -p 'a cute panda eating bamboos' -o output_folder
```
This command will generate 4 pictures located in `output_folder`, example outputs:
### Python API
```python
brush = BingBrush(cookie='/path/to/cookie.txt')
brush.process(prompt='a cute panda eating bamboos', out_folder='output_folder')
```## TODO
+ [ ] unit test
+ [ ] support for obtaining cookie from os.env## Logo
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## Contribution
##