-
Notifications
You must be signed in to change notification settings - Fork 2
Closed
Labels
enhancementNew feature or requestNew feature or request
Description
Add Sentiment Classification Generation Support
Overview
Implement sentiment classification generation class and related infrastructure to support both binary and 3-class sentiment analysis using CPU-friendly HuggingFace models. Use CPU friendly HF models such as distilbert-base-uncased-finetuned-sst-2-english and twitter-roberta-base-sentiment for development. Any new classes should follow the style of the existing classes.
Technical Requirements
1. Model Configuration
- Add new model type "sentiment" in model configuration
- Support for both binary and 3-class sentiment models:
- Default binary: "distilbert-base-uncased-finetuned-sst-2-english"
- Default multi-class: "twitter-roberta-base-sentiment"
2. Create SentimentGen Class
Create new file gaas/sentiment_gen/sentiment_gen.py:
- Implement
SentimentGenclass following existing pattern from similar classes - Support both single text and batch inference
- Include proper error handling and logging
3. Update Main Application
- Add SentimentGen to model type initialization in main.py
elif model_type == "sentiment":
app.state.gaas = SentimentGen(model_manager=model_manager)4. Request/Response Models
- Create new Pydantic models in pydantic_models/
5. Integration Requirements
- Support responses through /api/generate endpoint
6. Update documentation
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request