pollinations.ai | Image Generation
Project description
pollinations.ai - Image Generation
This is not the official pollinations.ai (https://pollinations.ai/)
This is a WRAPPER designed for easy text-image generation.
Installing
# Linux/macOS
python3 -m pip install -U pollinations.ai
# Windows
py -3 -m pip install -U pollinations.ai
Simple Examples
import pollinations.ai as ai
prompt: str = 'A cat with a top hat and a mustache.'
prompt_sample: str = ai.sample()
image_generator: ai.Image = ai.Image(save_file='pollinations.ai.jpg') # OPTIONAL: takes save_file parameter
image_generator.generate(prompt)
image_generator.save() # OPTIONAL: takes save_file parameter
Setting model filter:
import pollinations.ai as ai
image_generator: ai.Image = ai.Image()
image_generator.set_filter(ai.BANNED_WORDS)
# If any word from a prompt is in the filter it will return an exception.
Batch sample and generation:
import pollinations.ai as ai
batch: list = ai.sample_batch(size=5)
image_generator: ai.Image = ai.Image()
image_generator.generate_batch(prompts=batch, save=True) # OPTIONAL: path # OPTIONAL: naming = 'counter' | naming = 'prompt'
# image_generator.generate_batch(prompts=batch, save=True, path='somefolder', naming='promot')
Links
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pollinations.ai-0.1.5.tar.gz
(16.2 kB
view hashes)
Built Distributions
Close
Hashes for pollinations_ai-0.1.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2e250e94b22f3b97018c2340e407cf018fbb38aecb8bd619acb8bacbb2c46950 |
|
MD5 | 7a6948dd537d2d6d9a7b8e8c61286090 |
|
BLAKE2b-256 | 6c5c261efe154c818504a25de4b19b83d5f359e756049d2e0bb444b0e04daada |
Close
Hashes for pollinations.ai-0.1.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7e1afd3f681c85dae26156bfb9edd8d3dbaecc71261919fe2b16651942d99ffe |
|
MD5 | e94a4f1f702a1500244beb1f415860ba |
|
BLAKE2b-256 | 543a97738546325629262d36648fa6f05bc9ee6c0c005c7cf8a9ff1c8ae48486 |