thak123 commited on
Commit
3c0d911
1 Parent(s): eca91f3

Update index.py

Browse files
Files changed (1) hide show
  1. index.py +3 -3
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
- # df_filtered = df_filtered.sort_values(by=['FinBERT_label', 'date'])
337
- # df_filtered.to_dict('records')
338
- return line_fig_1, bar_fig_1, pie_chart_1, line_fig_2, pie_chart_2, {'data': []}
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