Spaces:
Runtime error
Runtime error
Karthikeyan
commited on
Commit
·
873cb4b
1
Parent(s):
1bc5391
Update app.py
Browse files
app.py
CHANGED
@@ -25,8 +25,8 @@ class SentimentAnalyzer:
|
|
25 |
sentiment_scores_str = f"Positive: {sentiment_scores['positive']:.2f}, Neutral: {sentiment_scores['neutral']:.2f}, Negative: {sentiment_scores['negative']:.2f}"
|
26 |
return sentiment_scores_str
|
27 |
def emotion_analysis(self,text):
|
28 |
-
prompt = f""" Your task is find the top
|
29 |
-
your are analyze the text and provide the output in the following format: emotion: score [with top
|
30 |
The scores should be in the range of 0.0 to 1.0, where 1.0 represents the highest intensity of the emotion.\
|
31 |
analyze the text : '''{text}'''
|
32 |
"""
|
|
|
25 |
sentiment_scores_str = f"Positive: {sentiment_scores['positive']:.2f}, Neutral: {sentiment_scores['neutral']:.2f}, Negative: {sentiment_scores['negative']:.2f}"
|
26 |
return sentiment_scores_str
|
27 |
def emotion_analysis(self,text):
|
28 |
+
prompt = f""" Your task is find the top 1 emotion : <Sadness, Happiness, Joy, Fear, Disgust, Anger> and it's emotion score of the text.\
|
29 |
+
your are analyze the text and provide the output in the following format: emotion: score [with top 1 result having the highest score]
|
30 |
The scores should be in the range of 0.0 to 1.0, where 1.0 represents the highest intensity of the emotion.\
|
31 |
analyze the text : '''{text}'''
|
32 |
"""
|