Spaces:
Build error
Build error
Download utils/validators.py from prashantpatil3299/ProjectLensAI: direct link, hf CLI and curl.
- Browser
- Download file 288 Bytes
-
https://huggingface.co/spaces/prashantpatil3299/ProjectLensAI/resolve/main/utils/validators.py
- Command line
-
hf download hf://spaces/prashantpatil3299/ProjectLensAI/utils/validators.py
-
curl -L -o validators.py https://huggingface.co/spaces/prashantpatil3299/ProjectLensAI/resolve/main/utils/validators.py
288 Bytes
| def validate_input_text(text: str, max_length: int = 5000): | |
| if not text or not text.strip(): | |
| raise ValueError("Input text cannot be empty.") | |
| if len(text) > max_length: | |
| raise ValueError(f"Input text exceeds max length of {max_length} characters.") | |
| return True |