diff --git a/sentiment_model.pickle b/sentiment_model.pickle new file mode 100644 index 000000000..f5e51a666 Binary files /dev/null and b/sentiment_model.pickle differ diff --git a/src/dashboard/data_api.py b/src/dashboard/data_api.py index 0c4bd1932..1b0aabddf 100644 --- a/src/dashboard/data_api.py +++ b/src/dashboard/data_api.py @@ -65,7 +65,7 @@ def getSentiment(documents): results = [] df_data = [] for doc in documents['results']: - df_data.append(doc['summary']) + df_data.append(doc['title']) df = pd.DataFrame(df_data, columns=["Text"]) results = sentiment.predict(df) @@ -79,7 +79,4 @@ def getSentiment(documents): return 0.0 else: print('unknown sentiment') - return 0.5 - - import random - return random.random() + return 0.5 \ No newline at end of file