diff --git a/article_analyzer.py b/article_analyzer.py index bbef80f..9ca60b0 100644 --- a/article_analyzer.py +++ b/article_analyzer.py @@ -12,9 +12,14 @@ class Category(str, Enum): TECHNOLOGICAL_DEVELOPMENTS = "Technological Developments" WHALE_EXCHANGE_ACTIVITY = "Whale & Exchange Activity" +class Sentiment(str, Enum): + POSITIVE = "Positive" + NEUTRAL = "Neutral" + NEGATIVE = "Negative" + class ArticleClassification(BaseModel): category: Category - sentiment: int + sentiment: Sentiment class ArticleAnalyzer: def __init__(self): @@ -28,7 +33,7 @@ class ArticleAnalyzer: - Technological Developments - Whale & Exchange Activity - Also, assign a sentiment (1 for Positive, -1 for Negative, or 0 for Neutral). + Also, assign a sentiment (Positive, Neutral or Negative) """ print(f"This JSON model is going to be used for structured ouput classification : {ArticleClassification.model_json_schema()}")