YchKhan commited on
Commit
4c4cf13
1 Parent(s): c8197d4

two variables had a same name by mistake

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -158,7 +158,7 @@ with gr.Blocks() as demo:
158
  gr.Markdown("```python\new_df.to_excel(YOUR_NEW_FILE)\nreturn YOUR_NEW_FILE\n```")
159
 
160
  btn_run_code = gr.Button()
161
- df_output = gr.DataFrame(interactive=False)
162
  btn_export_df = gr.Button('Export df as excel')
163
  st_filename = gr.State()
164
 
@@ -186,8 +186,8 @@ with gr.Blocks() as demo:
186
 
187
  btn_chart.click(create_bar_plot, inputs=[fi_excel, dd_label1, dd_label2], outputs=[plt_figure])
188
 
189
- btn_run_code.click(run_code, inputs=[fi_excel, cd_code], outputs=[df_output])
190
- btn_export_df.click(export_df, inputs=[df_output, st_filename], outputs=fi_excel)
191
 
192
 
193
  btn_overall.click(generate_company_chart,inputs=[fi_excel], outputs=[plt_chart])
 
158
  gr.Markdown("```python\new_df.to_excel(YOUR_NEW_FILE)\nreturn YOUR_NEW_FILE\n```")
159
 
160
  btn_run_code = gr.Button()
161
+ df_output_code = gr.DataFrame(interactive=False)
162
  btn_export_df = gr.Button('Export df as excel')
163
  st_filename = gr.State()
164
 
 
186
 
187
  btn_chart.click(create_bar_plot, inputs=[fi_excel, dd_label1, dd_label2], outputs=[plt_figure])
188
 
189
+ btn_run_code.click(run_code, inputs=[fi_excel, cd_code], outputs=[df_output_code])
190
+ btn_export_df.click(export_df, inputs=[df_output_code, st_filename], outputs=fi_excel)
191
 
192
 
193
  btn_overall.click(generate_company_chart,inputs=[fi_excel], outputs=[plt_chart])