Spaces:
Runtime error
Runtime error
Update components/sentiment_analysis.py
Browse files
components/sentiment_analysis.py
CHANGED
@@ -5,7 +5,7 @@ class EnhancedSentimentAnalyzer:
|
|
5 |
def __init__(self):
|
6 |
self.sentiment_pipeline = pipeline('sentiment-analysis')
|
7 |
|
8 |
-
def analyze(self, text: str) -> dict[str,
|
9 |
"""Analyze sentiment with advanced techniques"""
|
10 |
analysis = self.sentiment_pipeline(text)
|
11 |
return analysis[0]
|
|
|
5 |
def __init__(self):
|
6 |
self.sentiment_pipeline = pipeline('sentiment-analysis')
|
7 |
|
8 |
+
def analyze(self, text: str) -> dict[str, any]:
|
9 |
"""Analyze sentiment with advanced techniques"""
|
10 |
analysis = self.sentiment_pipeline(text)
|
11 |
return analysis[0]
|