Feat: Add Hugging Face Space as Client-Side Backend Integration
Description
Implement support for using a deployed Hugging Face Space as an alternative client-side backend for the application. The frontend should be able to directly communicate with the Hugging Face Space API endpoint for tasks such as transcription, summarization, inference, or other AI-powered features.
This integration should be configurable, scalable, and should not affect the existing backend flow. Users or developers should be able to switch between the current backend and the Hugging Face Space backend based on environment or configuration settings.
Problem Statement
Currently, the application depends only on the existing backend service. There is no support for using external hosted inference services like Hugging Face Spaces.
Proposed Solution
- Integrate Hugging Face Space API with frontend service layer.
- Add environment variable for Space URL.
- Add optional API token support if required.
- Implement backend switching mechanism.
- Normalize response formats across all backends.
- Add proper loading, timeout, and error handling.
- Preserve current backend functionality.
Scope of Work
- Update API configuration.
- Modify frontend request handlers.
- Add backend selector/config support.
- Handle response mapping.
- Add UI states for loading/errors.
- Test all supported backend flows.
Acceptance Criteria
- Frontend successfully connects to Hugging Face Space API.
- Users/developers can switch backend sources easily.
- Existing backend remains fully functional.
- Errors are handled gracefully.
- Response data is displayed correctly in UI.
- Environment-based deployment configuration works properly.
closes #1 (closed)