Spaces:
Sleeping
Sleeping
| import re | |
| def handle_text_input(text: str) -> dict: | |
| cleaned = text.strip() | |
| cleaned = re.sub(r"\s+", " ", cleaned) | |
| return { | |
| "text": cleaned, | |
| "confidence": 1.0, | |
| "input_type": "text", | |
| } | |
| import re | |
| def handle_text_input(text: str) -> dict: | |
| cleaned = text.strip() | |
| cleaned = re.sub(r"\s+", " ", cleaned) | |
| return { | |
| "text": cleaned, | |
| "confidence": 1.0, | |
| "input_type": "text", | |
| } | |