Spaces:
Runtime error
Runtime error
Commit
·
87d0433
1
Parent(s):
ae14ac6
Update app.py
Browse files
app.py
CHANGED
@@ -15,6 +15,8 @@ grouped_predictions = predictions_df.groupby(predictions_df.Sentiment)
|
|
15 |
#neutral_preds = grouped_predictions.get_group(1)
|
16 |
negative_preds = grouped_predictions.get_group(0)
|
17 |
|
|
|
|
|
18 |
|
19 |
def article_selection(sentiment):
|
20 |
if sentiment == "Positive":
|
@@ -37,9 +39,6 @@ def article_selection(sentiment):
|
|
37 |
return predictions_df_url0, predictions_df_url1, predictions_df_url2
|
38 |
|
39 |
def manual_label():
|
40 |
-
# Encoding sentiment data
|
41 |
-
predictions_df['Sentiment'] = predictions_df['Sentiment'].map({0: 'Negative', 1: 'Neutral', 2: 'Positive'})
|
42 |
-
|
43 |
# Selecting random row from batch data
|
44 |
random_sample = predictions_df.sample()
|
45 |
random_headline = random_sample['Headline_string'].iloc[0]
|
|
|
15 |
#neutral_preds = grouped_predictions.get_group(1)
|
16 |
negative_preds = grouped_predictions.get_group(0)
|
17 |
|
18 |
+
predictions_df['Sentiment'] = predictions_df['Sentiment'].map({0: 'Negative', 1: 'Neutral', 2: 'Positive'})
|
19 |
+
|
20 |
|
21 |
def article_selection(sentiment):
|
22 |
if sentiment == "Positive":
|
|
|
39 |
return predictions_df_url0, predictions_df_url1, predictions_df_url2
|
40 |
|
41 |
def manual_label():
|
|
|
|
|
|
|
42 |
# Selecting random row from batch data
|
43 |
random_sample = predictions_df.sample()
|
44 |
random_headline = random_sample['Headline_string'].iloc[0]
|