简单文字生成图片
pollinations-ai 这个网站超好玩,简单文字生成漂亮图片,不用注册和登录。AI 真的强大呀! 下次配个图片看看 https://pollinations.ai/p/%E7%94%B5%E5%BD%B1%E9%87%8C%E5%93%AA%E5%90%92%E7%9A%84%E5%BD%A2%E8%B1%A1%20%E7%8E%A9%E7%94%B5%E8%84%91%20%20%E6%83%8A%E8%AE%B6%E7%9A%84%E8%A1%A8%E6%83%85%20%E7%8E%B0%E4%BB%A3%E7%8E%AF%E5%A2%83%20%E4%B8%8D%E8%A6%81%E6%9C%89%E6%96%87%E5%AD%97?width=600&height=600&seed=59&nologo=true&model=flux 捕获网址:https://pollinations.ai/上面提供的python调用:
# Python code example for downloading an image
import requests
def download_image(image_url):
# Fetching the image from the URL
response = requests.get(image_url)
# Writing the content to a file named 'image.jpg'
with open('image.jpg', 'wb') as file:
file.write(response.content)
# Logging completion message
print('Download Completed')
# Image details
prompt = 'A beautiful landscape'
width = 1024
height = 1024
seed = 42 # Each seed generates a new image variation
model = 'flux' # Using 'flux' as default if model is not provided
image_url = f"https://pollinations.ai/p/{prompt}?width={width}&height={height}&seed={seed}&model={model}"
download_image(image_url)
# Using the pollinations pypi package
## pip install pollinations
import pollinations as ai
model_obj = ai.Model()
image = model_obj.generate(
prompt=f'A beautiful landscape {ai.realistic}',
model=ai.flux,
width=1024,
height=1024,
seed=42
)
image.save('image-output.jpg')
print(image.url)
中文提示词也行,可以多次生成,是原始生成的,真好玩!
页:
[1]