aamirtaymoor commited on
Commit
2872c31
·
verified ·
1 Parent(s): 4bb6e82

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +1 -2
main.py CHANGED
@@ -16,13 +16,12 @@ def read_root(text_rating: TextRatingRequest):
16
  rating = text_rating.rating
17
  skip = False
18
  raw_data = {"text": text, "star_rating": rating, "skip": skip}
19
- # processed_data = get_review_sentiment(raw_data)
20
  ml = MlProcessing(comment_dict=raw_data)
21
  processed_data = ml.main()
22
  spans = processed_data.get('spans', list())
23
  has_sentiments = True
24
  if not any(spans):
25
- spans = [{'label': plain_text, 'color': '', 'value': '', 'sentiment': '', 'score': ''}]
26
  has_sentiments = False
27
  processed_data['spans'] = spans
28
  print(f"Processed data : {processed_data}")
 
16
  rating = text_rating.rating
17
  skip = False
18
  raw_data = {"text": text, "star_rating": rating, "skip": skip}
 
19
  ml = MlProcessing(comment_dict=raw_data)
20
  processed_data = ml.main()
21
  spans = processed_data.get('spans', list())
22
  has_sentiments = True
23
  if not any(spans):
24
+ spans = [{'label': text, 'color': '', 'value': '', 'sentiment': '', 'score': ''}]
25
  has_sentiments = False
26
  processed_data['spans'] = spans
27
  print(f"Processed data : {processed_data}")