Spaces:
Running on Zero
Running on Zero
Download examples/quickstart.py from Brianferrell787/range: direct link, hf CLI and curl.
- Browser
- Download file 736 Bytes
-
https://huggingface.co/spaces/Brianferrell787/range/resolve/main/examples/quickstart.py
- Command line
-
hf download hf://spaces/Brianferrell787/range/examples/quickstart.py
-
curl -L -o quickstart.py https://huggingface.co/spaces/Brianferrell787/range/resolve/main/examples/quickstart.py
736 Bytes
| """Run the general-economy example shown in the README.""" | |
| from __future__ import annotations | |
| from range_curate.examples.general_economy import RelevanceEngine | |
| def main() -> None: | |
| engine = RelevanceEngine(workers=1) | |
| decision = engine.predict( | |
| ( | |
| "CPI inflation cooled after the Federal Reserve cut the federal funds rate. " | |
| "The S&P 500 and Nasdaq-100 advanced." | |
| ), | |
| timestamp="2025-01-15T10:30:00-05:00", | |
| article_id="economy-example", | |
| source="example", | |
| ) | |
| print("status:", decision.status) | |
| print("accepted:", decision.accepted) | |
| print("markets:", ", ".join(decision.relevant_to)) | |
| if __name__ == "__main__": | |
| main() | |