Spaces:
Sleeping
Sleeping
Update index.py
Browse files
index.py
CHANGED
@@ -333,9 +333,9 @@ def update_output(selected_topic, selected_domain, start_date, end_date):
|
|
333 |
ordered=True)
|
334 |
|
335 |
# Sort DataFrame by sentiment label and date
|
336 |
-
|
337 |
-
|
338 |
-
return line_fig_1, bar_fig_1, pie_chart_1, line_fig_2, pie_chart_2,
|
339 |
else:
|
340 |
return {'data': []},{'data': []} ,{'data': []} ,{'data': []} , {'data': []}, {'data': []}
|
341 |
|
|
|
333 |
ordered=True)
|
334 |
|
335 |
# Sort DataFrame by sentiment label and date
|
336 |
+
data_table_1 = df_filtered.sort_values(by=['FinBERT_label', 'date'])
|
337 |
+
|
338 |
+
return line_fig_1, bar_fig_1, pie_chart_1, line_fig_2, pie_chart_2, data_table_1.to_dict('records')
|
339 |
else:
|
340 |
return {'data': []},{'data': []} ,{'data': []} ,{'data': []} , {'data': []}, {'data': []}
|
341 |
|