Spaces:
Sleeping
Sleeping
|
Download docs/md/design/core/input_handler.md from thanhnv2323/humanize-text-python: direct link, hf CLI and curl.
- Browser
- Download file 825 Bytes
-
https://huggingface.co/spaces/thanhnv2323/humanize-text-python/resolve/main/docs/md/design/core/input_handler.md
- Command line
-
hf download hf://spaces/thanhnv2323/humanize-text-python/docs/md/design/core/input_handler.md
-
curl -L -o input_handler.md https://huggingface.co/spaces/thanhnv2323/humanize-text-python/resolve/main/docs/md/design/core/input_handler.md
825 Bytes
Core: InputHandler
Code: adsp/core/input_handler/__init__.py
Purpose
InputHandler normalizes user inputs before retrieval and prompt building.
Responsibilities
- Normalize text input (current)
- (Planned) route and preprocess multimodal inputs:
- PDF text extraction + page selection
- Image preprocessing and OCR / captioning
Public API
normalize(text: str) -> str
Input
- raw text string
Output
- stripped text string (
text.strip())
Key dependencies / technologies
- Python
dataclasses
Notes / production hardening
To meet docs/md/design.md multimodal requirements, expand this component with:
- PDF extraction via
pymupdf(fitz) orpdf2image+ OCR - Attachment routing into the pipeline used in
adsp/data_pipeline/persona_data_pipeline/extract_raw/