File size: 318 Bytes
ed4033a
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
# Utility functions for the text-to-image generator
def validate_prompt(prompt):
    """Basic prompt validation"""
    if not prompt or len(prompt.strip()) == 0:
        return False, "Prompt cannot be empty"
    if len(prompt) > 500:
        return False, "Prompt is too long (max 500 characters)"
    return True, ""