Spaces:
Runtime error
Runtime error
Commit
·
422b3a9
1
Parent(s):
6c868e7
Update main.py
Browse files
main.py
CHANGED
@@ -28,7 +28,7 @@ def create_sentiment_result(sentiment_result: schemas.SentimentResultCreate,text
|
|
28 |
new_sentiment_result = models.SentimentResult(
|
29 |
positive_score=sentiment_analysis_result["score"] if sentiment_analysis_result["label"] == "POSITIVE" else 0.0,
|
30 |
negative_score=sentiment_analysis_result["score"] if sentiment_analysis_result["label"] == "NEGATIVE" else 0
|
31 |
-
text_content
|
32 |
)
|
33 |
# Add the new SentimentResult to the database
|
34 |
db.add(new_sentiment_result)
|
|
|
28 |
new_sentiment_result = models.SentimentResult(
|
29 |
positive_score=sentiment_analysis_result["score"] if sentiment_analysis_result["label"] == "POSITIVE" else 0.0,
|
30 |
negative_score=sentiment_analysis_result["score"] if sentiment_analysis_result["label"] == "NEGATIVE" else 0
|
31 |
+
text=text_content
|
32 |
)
|
33 |
# Add the new SentimentResult to the database
|
34 |
db.add(new_sentiment_result)
|