Spaces:
Running
Running
Update tubes.py
Browse files
tubes.py
CHANGED
@@ -56,7 +56,7 @@ data['complete_review']= data['complete_review'].apply(lemmatize_text)
|
|
56 |
words_to_remove = ['chatgpt','app','chatgpts','chat','gpt','iphone','ipad','gpt4','phone','number','ai','use','io']
|
57 |
data['complete_review'] = data['complete_review'].apply(lambda x: " ".join(x for x in x.split() if x not in words_to_remove))
|
58 |
|
59 |
-
data['sentiment'] = data['rating'].apply(lambda rating:
|
60 |
|
61 |
data['sentiment'].value_counts(normalize=True).mul(100).round(2)
|
62 |
|
|
|
56 |
words_to_remove = ['chatgpt','app','chatgpts','chat','gpt','iphone','ipad','gpt4','phone','number','ai','use','io']
|
57 |
data['complete_review'] = data['complete_review'].apply(lambda x: " ".join(x for x in x.split() if x not in words_to_remove))
|
58 |
|
59 |
+
data['sentiment'] = data['rating'].apply(lambda rating: 2 if rating > 3 else (1 if rating == 3 else 0))
|
60 |
|
61 |
data['sentiment'].value_counts(normalize=True).mul(100).round(2)
|
62 |
|