Last updated 7 months ago
Pollinations - Also generates images like Prodia, but Pollinations is more of an acquired taste. However, it all depends on the quality of the prompt!
from freeGPTFix import Client from PIL import Image from io import BytesIO while True: prompt = input("> ") try: resp = Client.create_generation("pollinations", prompt) Image.open(BytesIO(resp)).show() print(f"🤖: Image shown.") except Exception as e: print(f"🤖: {e}")
def create(self, prompt): try: return get( url=f"https://image.pollinations.ai/prompt/{prompt}{randint(1, 10000)}", timeout=30, ).content except RequestException as exc: raise RequestException("Unable to fetch the response.") from exc