Spaces:
Runtime error
Runtime error
Download test_classifier2.py from raidoo/ai-bookkeeper-backend: direct link, hf CLI and curl.
- Browser
- Download file 302 Bytes
-
https://huggingface.co/spaces/raidoo/ai-bookkeeper-backend/resolve/main/test_classifier2.py
- Command line
-
hf download hf://spaces/raidoo/ai-bookkeeper-backend/test_classifier2.py
-
curl -L -o test_classifier2.py https://huggingface.co/spaces/raidoo/ai-bookkeeper-backend/resolve/main/test_classifier2.py
302 Bytes
| from transformers import pipeline | |
| try: | |
| print("Loading jonjimenez/transaction-categorization...") | |
| classifier = pipeline("text-classification", model="jonjimenez/transaction-categorization") | |
| res = classifier("Starbucks coffee") | |
| print(res) | |
| except Exception as e: | |
| print(f"Error: {e}") | |