ppsingh commited on
Commit
8eafb9f
1 Parent(s): bfa165f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +21 -0
app.py CHANGED
@@ -129,10 +129,31 @@ if 'key1' in st.session_state:
129
  file_name= os.path.splitext(os.path.basename(st.session_state['filename']))[0]+'.xlsx')
130
  elif topic == 'Actions':
131
  tapp_display.action_display()
 
 
 
 
 
 
 
132
  elif topic == 'Policy':
133
  tapp_display.policy_display()
 
 
 
 
 
 
 
134
  elif topic == 'Plans':
135
  tapp_display.plans_display()
 
 
 
 
 
 
 
136
 
137
  #excel_convert.filter_dataframe('target_hits',['keep','text','Parameter','page'])
138
  #with st.sidebar:
 
129
  file_name= os.path.splitext(os.path.basename(st.session_state['filename']))[0]+'.xlsx')
130
  elif topic == 'Actions':
131
  tapp_display.action_display()
132
+ excel_convert.filter_dataframe('action_hits',['keep','text','Sector','page'])
133
+ with st.sidebar:
134
+ st.write('-------------')
135
+ df_xlsx = excel_convert.to_excel()
136
+ st.download_button(label='📥 Download Result',
137
+ data=df_xlsx ,
138
+ file_name= os.path.splitext(os.path.basename(st.session_state['filename']))[0]+'.xlsx')
139
  elif topic == 'Policy':
140
  tapp_display.policy_display()
141
+ excel_convert.filter_dataframe('policy_hits',['keep','text','Sector','page'])
142
+ with st.sidebar:
143
+ st.write('-------------')
144
+ df_xlsx = excel_convert.to_excel()
145
+ st.download_button(label='📥 Download Result',
146
+ data=df_xlsx ,
147
+ file_name= os.path.splitext(os.path.basename(st.session_state['filename']))[0]+'.xlsx')
148
  elif topic == 'Plans':
149
  tapp_display.plans_display()
150
+ excel_convert.filter_dataframe('plan_hits',['keep','text','Sector','page'])
151
+ with st.sidebar:
152
+ st.write('-------------')
153
+ df_xlsx = excel_convert.to_excel()
154
+ st.download_button(label='📥 Download Result',
155
+ data=df_xlsx ,
156
+ file_name= os.path.splitext(os.path.basename(st.session_state['filename']))[0]+'.xlsx')
157
 
158
  #excel_convert.filter_dataframe('target_hits',['keep','text','Parameter','page'])
159
  #with st.sidebar: