Spaces:
Runtime error
Runtime error
Check training data
#3
by
eengel7
- opened
app.py
CHANGED
@@ -59,6 +59,7 @@ def thanks(sentiment):
|
|
59 |
global training_df
|
60 |
# Append training data set
|
61 |
training_df = training_df.append({'Sentiment': sentiment, 'Headline_string': random_sample['Headline_string'].iloc[0], 'Headline': random_sample['Headline'].iloc[0] }, ignore_index=True)
|
|
|
62 |
|
63 |
# Upload training data set
|
64 |
ds = Dataset.from_pandas(training_df)
|
|
|
59 |
global training_df
|
60 |
# Append training data set
|
61 |
training_df = training_df.append({'Sentiment': sentiment, 'Headline_string': random_sample['Headline_string'].iloc[0], 'Headline': random_sample['Headline'].iloc[0] }, ignore_index=True)
|
62 |
+
training_df = training_df.drop_duplicates(subset='Headline_string').reset_index(drop=True)
|
63 |
|
64 |
# Upload training data set
|
65 |
ds = Dataset.from_pandas(training_df)
|