image_to_prompt
The image_to_prompt
function makes it easy to generate a textual description from an image. Below is a basic usage example:
from zerogpt.utils.tools.image_to_prompt import image_to_prompt
# Simple example
print(image_to_prompt('./image.png'))
You can also specify the desired prompt style using the prompt_style
parameter:
print(image_to_prompt('./image.png', prompt_style='short'))
Available prompt_style
options:
'tag'
— generates short descriptive tags'creative'
— produces a creative and artistic description'long'
— generates a detailed and elaborate description'short'
— returns a concise and compact description
Last updated
Was this helpful?