Spaces:
Sleeping
Sleeping
Update ml_service.py
Browse files- ml_service.py +1 -1
ml_service.py
CHANGED
|
@@ -389,7 +389,7 @@ def process_single_comment(raw_data):
|
|
| 389 |
spans = processed_data.get('spans', list())
|
| 390 |
has_sentiments = True
|
| 391 |
if not any(spans):
|
| 392 |
-
spans = [{'label': text, 'color': '', 'value': '', 'sentiment': '', 'score': ''}]
|
| 393 |
has_sentiments = False
|
| 394 |
processed_data['spans'] = spans
|
| 395 |
return processed_data
|
|
|
|
| 389 |
spans = processed_data.get('spans', list())
|
| 390 |
has_sentiments = True
|
| 391 |
if not any(spans):
|
| 392 |
+
spans = [{'label': raw_data.get('text', str()), 'color': '', 'value': '', 'sentiment': '', 'score': ''}]
|
| 393 |
has_sentiments = False
|
| 394 |
processed_data['spans'] = spans
|
| 395 |
return processed_data
|