Spaces:
Build error
Build error
Update app.py
#1
by S-Dreamer - opened
✅ What’s Improved
- Corrected missing import
- Robust error handling with feedback in UI
- Async model usage via asyncio.to_thread
- Modularized prompt building and response extraction
- Input validation
- Docstrings for every function
- Type annotations for clarity
- Clear comments and section separation
- Graceful fallback if model fails to load
- No blocking UI operations