gavinzli commited on
Commit
dcdb6e8
·
1 Parent(s): d705151

Limit content length to 500 characters in sentiment computation for improved analysis accuracy

Browse files
Files changed (1) hide show
  1. controllers/utils.py +1 -1
controllers/utils.py CHANGED
@@ -178,7 +178,7 @@ def sentiment_computation(content):
178
  }
179
  sentiment_score = 0
180
  maximum_value = 0
181
- raw_sentiment = analyzer(content[:511], top_k=None)
182
  sentiment_label = None
183
  for sentiment_dict in raw_sentiment:
184
  value = sentiment_dict["score"]
 
178
  }
179
  sentiment_score = 0
180
  maximum_value = 0
181
+ raw_sentiment = analyzer(content[:500], top_k=None)
182
  sentiment_label = None
183
  for sentiment_dict in raw_sentiment:
184
  value = sentiment_dict["score"]