No project description provided
Project description
bing_image_creator_api
This repository was created using the code from these repositories:
I am very thankful to the creators of these repos, they did an amazing job. I simplified the algorithm a lot and added a better (in my opinion) way to invoke the tool programmatically.
What's not currently supported
Using boosts for generations
Installation
pip install bing_image_creator_api
Usage
As a library
import bing_image_creator_api
import asyncio
import webbrowser
from getpass import getpass
async def main():
client = bing_image_creator_api.Client(user_token=getpass("Enter your user token: "))
urls = await client.create("cute puppies")
for url in urls:
webbrowser.open(url)
asyncio.run(main())
As a standalone program
The "token file" is a file containing tokens from one or more accounts, where each token is placed on a separate line. This file can have comments that start with "#". Empty lines are skipped too. Be aware that the first token from the list is used to check if the prompt will pass the filter, which may lead the account the token belongs to to be banned if the prompt is actually unsafe, so it will be mindful to use the token from an account you don't care about as the first token. Repeating tokens are not removed
python -m bing_image_creator_api -t '/path/to/token/file.txt' -n 10 -p "cute puppies" # Generate at least 10 images and then stop
python -m bing_image_creator_api -t '/path/to/token/file.txt' -p "cute puppies" # Generate images until killed (Ctrl+C)
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file bing_image_creator_api-0.5.0.tar.gz
.
File metadata
- Download URL: bing_image_creator_api-0.5.0.tar.gz
- Upload date:
- Size: 3.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.7.1 CPython/3.10.13 Linux/5.4.0-150-generic
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | eb227d008fe2b4b31529f346aabd763fdbce6688b1475cabd500e5d2b50457e9 |
|
MD5 | c5f443852ae420e59af56431a0fca0fe |
|
BLAKE2b-256 | 511d427d835f49521530a6a894b23379dfef339f0b883257c7e213a68901a37e |
File details
Details for the file bing_image_creator_api-0.5.0-py3-none-any.whl
.
File metadata
- Download URL: bing_image_creator_api-0.5.0-py3-none-any.whl
- Upload date:
- Size: 4.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.7.1 CPython/3.10.13 Linux/5.4.0-150-generic
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 58e0137897629fe2ef389cf433341cceac3e19c90241d80e4b63c56ebcf19c5e |
|
MD5 | edec36be7f2b3e311cd84672ed426cae |
|
BLAKE2b-256 | 7e9122c76a425afd32173f87b45c63649be1d5bb510d16ead97afdacb03ce0cc |