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-2.1.tar.gz
(6.7 kB
view details)
Built Distribution
File details
Details for the file pollinations-2.1.tar.gz
.
File metadata
- Download URL: pollinations-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 | 4cb49302aa98511308039f87533c831c15cd0cb5b771dd16665b7cf21d2062dc |
|
MD5 | 3bdb0ecace052a845cc581af8485c18e |
|
BLAKE2b-256 | 9483ff1ae3911abf73fbfc02dad69ce055b22cda82bbc8baee1b069dad226d89 |
File details
Details for the file pollinations-2.1-py3-none-any.whl
.
File metadata
- Download URL: pollinations-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 | 3b864a15f0ef5a4c285f752209fd9ba2334a5cded3a3cd84126326788c2178c7 |
|
MD5 | abaf1e9b83370fee60c9c02303bfab08 |
|
BLAKE2b-256 | 006667cf4cb26176f02ca739c98fbd3db667d5015de65bed8afa825bffd5adf6 |