Spaces:
Runtime error
Runtime error
Download debug_intent.py from Emeritus-21/frag-naija-api: direct link, hf CLI and curl.
- Browser
- Download file 600 Bytes
-
https://huggingface.co/spaces/Emeritus-21/frag-naija-api/resolve/main/debug_intent.py
- Command line
-
hf download hf://spaces/Emeritus-21/frag-naija-api/debug_intent.py
-
curl -L -o debug_intent.py https://huggingface.co/spaces/Emeritus-21/frag-naija-api/resolve/main/debug_intent.py
600 Bytes
| import asyncio, sys, traceback | |
| sys.path.insert(0, '.') | |
| from app.ai.groq import GroqProvider | |
| from app.services.intent_classifier import IntentClassifier | |
| from app.config import get_settings | |
| async def main(): | |
| settings = get_settings() | |
| llm = GroqProvider(settings) | |
| classifier = IntentClassifier(llm) | |
| try: | |
| print("Testing classifier directly...") | |
| res = await classifier.classify('What is Frag Naija?') | |
| print(f'SUCCESS: {res}') | |
| except Exception as e: | |
| print("CRASHED! Here is the exact line number:") | |
| traceback.print_exc() | |
| asyncio.run(main()) | |