Feat: Add Hugging Face Space as Client-Side Backend Integration
Issue Description:
Implement support for using a Hugging Face Space as an alternative backend for the client application. This allows the frontend to directly communicate with a deployed Hugging Face Space API for inference, transcription, summarization, or other AI tasks without depending solely on the existing local/server backend.
Objectives:
- Add configuration to connect frontend with Hugging Face Space endpoint.
- Support switching between current backend and Hugging Face Space backend.
- Handle API requests/responses from Hugging Face Space.
- Add environment variable for Space URL.
- Ensure proper loading, error, and timeout handling.
- Maintain existing functionality with current backend.
Scope:
- Update API service layer.
- Add backend selector/config option in frontend settings.
- Normalize response formats if Hugging Face Space output differs.
- Add fallback handling when Space is unavailable.
- Test end-to-end frontend integration.
Acceptance Criteria:
- Frontend can successfully call Hugging Face Space API.
- User can choose backend source.
- Errors are displayed gracefully.
- Existing backend flow remains unaffected.
- Deployment config supports environment-based endpoint changes.
Edited by Vaishnavi