Posts with empty title+selftext or comments with empty body now return
a neutral placeholder instead of running through the model, preventing
unreliable low-confidence predictions and reducing processing time.
Add comprehensive asyncio warning suppression for clean container logs
- Add custom exception hook to suppress specific asyncio cleanup errors
- Filter all asyncio-related warnings that are harmless in containers
- These warnings are cosmetic and don't affect sentiment analysis functionality
- Provides cleaner log output without breaking the application
Fix tokenizer padding token issue that was breaking functionality
- Move model creation before tokenizer padding fix
- Add proper padding token fallback to [PAD] if eos_token is None
- Resize model embeddings to accommodate new padding token
- This fixes the 'Asking to pad but the tokenizer does not have a padding token' error
Disable SSR mode to fix asyncio event loop cleanup errors
- Add ssr_mode=False to prevent event loop issues in containers
- SSR (Server-Side Rendering) can cause asyncio cleanup problems
- This should eliminate the 'Invalid file descriptor: -1' errors
Suppress asyncio cleanup warnings in containerized Gradio app