pollinations.ai | Image Generation
Project description
pollinations.ai - Image Generation
pollinations.ai: (https://pollinations.ai/)
Work with the best generative models from Pollinations using this python wrapper.
Installing
pip install -U pollinations
pip install -U pollinations.ai
# Linux/macOS
python3 -m pip install -U pollinations
python3 -m pip install -U pollinations.ai
# Windows
py -3 -m pip install -U pollinations
py -3 -m pip install -U pollinations.ai
Image Model
import pollinations
image_model: pollinations.ImageModel = pollinations.image(
model = pollinations.image_default,
seed = 0,
width = 1024,
height = 1024,
enhance = False,
nologo = False,
private = False,
)
image_model.generate(
prompt = "A black cat in a cyberpunk city.",
negative = "Anime, cartoony, childish.",
save = True,
file = "image-output.png",
)
Text Model
import pollinations
text_model: pollinations.TextModel = pollinations.text(
frequency_penalty = 0,
presence_penalty = 0,
temperature = 0.5,
top_p = 1,
model = pollinations.text_default,
stream = True,
contextual = True, # True: Holds conversation context up to 10. False: Has no conversation context
system = "You are a polite AI Assistant named Pollinations! Use emojis and markdown as you wish."
)
text_model.generate(
prompt="What is 1+1?",
display=True
)
text_model.generate(
prompt="Now add 10 to that.",
display=True
)
text_model.image(
file="my_file.png"
)
text_model.generate(
prompt="Describe that file.",
display=True
)
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-2.1.tar.gz
(6.7 kB
view details)
Built Distribution
File details
Details for the file pollinations_ai-2.1.tar.gz
.
File metadata
- Download URL: pollinations_ai-2.1.tar.gz
- Upload date:
- Size: 6.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 36e2785939fea3b7f0aaa913247cfe1017a7d0784a030cca643d459090775b7d |
|
MD5 | ebd63b8e8a6634f3e8b62e15960aa3fb |
|
BLAKE2b-256 | 0d92ff0f72d240c33a8520a9727a11f434da7fd17f28e0fe0899e108978ec2e4 |
File details
Details for the file pollinations.ai-2.1-py3-none-any.whl
.
File metadata
- Download URL: pollinations.ai-2.1-py3-none-any.whl
- Upload date:
- Size: 6.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c548aecbef03833a882c6980d70591e6c0d36f6e56293616577a8defc714f91c |
|
MD5 | a72bc89518d475eeec6126d6426aebe9 |
|
BLAKE2b-256 | 6ba79e89e903816168127efe32481e19d888182f7446031ab36d61423ccc184b |