Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -162,6 +162,7 @@ with gr.Blocks() as demo:
|
|
162 |
gr.Markdown("```python\nnew_df.to_excel(YOUR_NEW_FILE)\nreturn YOUR_NEW_FILE\n```")
|
163 |
|
164 |
btn_run_code = gr.Button()
|
|
|
165 |
df_output_code = gr.DataFrame(interactive=False)
|
166 |
btn_export_df = gr.Button('Export df as excel')
|
167 |
st_filename = gr.State()
|
@@ -190,7 +191,9 @@ with gr.Blocks() as demo:
|
|
190 |
|
191 |
btn_chart.click(create_bar_plot, inputs=[fi_excel, dd_label1, dd_label2], outputs=[plt_figure])
|
192 |
|
193 |
-
|
|
|
|
|
194 |
btn_export_df.click(export_df, inputs=[df_output_code, st_filename], outputs=fi_excel)
|
195 |
|
196 |
|
|
|
162 |
gr.Markdown("```python\nnew_df.to_excel(YOUR_NEW_FILE)\nreturn YOUR_NEW_FILE\n```")
|
163 |
|
164 |
btn_run_code = gr.Button()
|
165 |
+
error_display = gr.Textbox(label="Errors", value="")
|
166 |
df_output_code = gr.DataFrame(interactive=False)
|
167 |
btn_export_df = gr.Button('Export df as excel')
|
168 |
st_filename = gr.State()
|
|
|
191 |
|
192 |
btn_chart.click(create_bar_plot, inputs=[fi_excel, dd_label1, dd_label2], outputs=[plt_figure])
|
193 |
|
194 |
+
|
195 |
+
|
196 |
+
btn_run_code.click(run_code_and_update_ui, inputs=[fi_excel, cd_code], outputs=[df_output_code])
|
197 |
btn_export_df.click(export_df, inputs=[df_output_code, st_filename], outputs=fi_excel)
|
198 |
|
199 |
|