Spaces:
Runtime error
Runtime error
Commit
·
e5d85e7
1
Parent(s):
43721a6
Update app.py
Browse files
app.py
CHANGED
|
@@ -12,11 +12,15 @@ dataset_api = project.get_dataset_api()
|
|
| 12 |
dataset_api.download("Resources/batch_data_predictions.csv")
|
| 13 |
dataset = load_dataset("csv", data_files="batch_data_predictions.csv")
|
| 14 |
predictions_df = pd.DataFrame(dataset,columns=['Headlines', 'URL','Predictions'],)
|
| 15 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 16 |
|
| 17 |
def article_selection(sentiment):
|
| 18 |
if sentiment == "Positive":
|
| 19 |
-
|
| 20 |
#elif sentiment == "Negative":
|
| 21 |
# return f"""The sentence you requested is Negative!"""
|
| 22 |
#else:
|
|
|
|
| 12 |
dataset_api.download("Resources/batch_data_predictions.csv")
|
| 13 |
dataset = load_dataset("csv", data_files="batch_data_predictions.csv")
|
| 14 |
predictions_df = pd.DataFrame(dataset,columns=['Headlines', 'URL','Predictions'],)
|
| 15 |
+
predictions_df_url0 = predictions_df['URL'][0]
|
| 16 |
+
predictions_df_url1 = predictions_df['URL'][1]
|
| 17 |
+
predictions_df_url2 = predictions_df['URL'][3]
|
| 18 |
+
|
| 19 |
+
|
| 20 |
|
| 21 |
def article_selection(sentiment):
|
| 22 |
if sentiment == "Positive":
|
| 23 |
+
return predictions_df_url0, predictions_df_url1, predictions_df_url2 #f"""The sentence you requested is Positive!"""
|
| 24 |
#elif sentiment == "Negative":
|
| 25 |
# return f"""The sentence you requested is Negative!"""
|
| 26 |
#else:
|