Spaces:
Runtime error
Runtime error
Download utils.py from AiCoderv2/bright-hub-66: direct link, hf CLI and curl.
- Browser
- Download file 318 Bytes
-
https://huggingface.co/spaces/AiCoderv2/bright-hub-66/resolve/main/utils.py
- Command line
-
hf download hf://spaces/AiCoderv2/bright-hub-66/utils.py
-
curl -L -o utils.py https://huggingface.co/spaces/AiCoderv2/bright-hub-66/resolve/main/utils.py
318 Bytes
| # 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, "" |