Spaces:
Running
Running
Download scripts/workflow_cpu_app.py from Leon4gr45/needle: direct link, hf CLI and curl.
- Browser
- Download file 734 Bytes
-
https://huggingface.co/spaces/Leon4gr45/needle/resolve/main/scripts/workflow_cpu_app.py
- Command line
-
hf download hf://spaces/Leon4gr45/needle/scripts/workflow_cpu_app.py
-
curl -L -o workflow_cpu_app.py https://huggingface.co/spaces/Leon4gr45/needle/resolve/main/scripts/workflow_cpu_app.py
734 Bytes
| """Qualification-only fixed SDK date fact; never a production entrypoint. | |
| Needle 3.0.1 otherwise adds a wall-clock minute on agent construction. This | |
| matches its documented default date prefix at one preregistered instant, using | |
| the ordinary system parameter; no SDK/model/flags/thresholds are modified. | |
| """ | |
| import re | |
| import gateway | |
| DATE_FACT='date: 2026-10-17 Sat 00:00' | |
| original_build=gateway._build_agent | |
| def fixed_date_build(tools,system): | |
| text=system or '' | |
| if 'date:' not in text and not re.search(r'\d{4}-\d{2}-\d{2}',text) and not text.lstrip().startswith('{'): | |
| text=DATE_FACT+('; '+text if text.strip() else '') | |
| return original_build(tools,text) | |
| gateway._build_agent=fixed_date_build | |
| app=gateway.app | |