C2MV commited on
Commit
fa99217
verified
1 Parent(s): 5c5ea4a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +17 -19
app.py CHANGED
@@ -667,22 +667,20 @@ def fit_and_optimize_model():
667
 
668
  # Guardar las tablas en Excel temporal
669
  excel_path = rsm.save_tables_to_excel()
670
-
671
- # Guardar todas las figuras en un ZIP temporal
672
  zip_path = rsm.save_figures_to_zip()
673
 
674
  return (
675
- model_completo_output,
676
  pareto_completo,
677
- model_simplificado_output,
678
  pareto_simplificado,
679
- equation_output,
680
  optimization_table,
681
  prediction_table,
682
  contribution_table,
683
  anova_table,
684
- zip_path, # Ruta del ZIP de gr谩ficos
685
- excel_path # Ruta del Excel de tablas
686
  )
687
 
688
  def show_plot(current_index, all_figures):
@@ -827,18 +825,18 @@ def create_gradio_interface():
827
  fit_button.click(
828
  fit_and_optimize_model,
829
  inputs=[],
830
- outputs=[
831
- model_completo_output,
832
- pareto_completo_output,
833
- model_simplificado_output,
834
- pareto_simplificado_output,
835
- equation_output,
836
- optimization_table_output,
837
- prediction_table_output,
838
- contribution_table_output,
839
- anova_table_output,
840
- download_all_plots_button, # Ruta del ZIP de gr谩ficos
841
- download_excel_button # Ruta del Excel de tablas
842
  ]
843
  )
844
 
 
667
 
668
  # Guardar las tablas en Excel temporal
669
  excel_path = rsm.save_tables_to_excel()
 
 
670
  zip_path = rsm.save_figures_to_zip()
671
 
672
  return (
673
+ model_completo.summary().as_html(),
674
  pareto_completo,
675
+ model_simplificado.summary().as_html(),
676
  pareto_simplificado,
677
+ equation_formatted,
678
  optimization_table,
679
  prediction_table,
680
  contribution_table,
681
  anova_table,
682
+ zip_path,
683
+ excel_path
684
  )
685
 
686
  def show_plot(current_index, all_figures):
 
825
  fit_button.click(
826
  fit_and_optimize_model,
827
  inputs=[],
828
+ outputs=[ # Corrected outputs to return calculated values not output components
829
+ model_completo_output, # This should be removed, returning summary HTML string instead
830
+ pareto_completo_output, # This should be removed, returning Plotly Figure instead
831
+ model_simplificado_output, # This should be removed, returning summary HTML string instead
832
+ pareto_simplificado_output, # This should be removed, returning Plotly Figure instead
833
+ equation_output, # This should be removed, returning formatted equation string instead
834
+ optimization_table_output, # This should be removed, returning DataFrame instead
835
+ prediction_table_output, # This should be removed, returning DataFrame instead
836
+ contribution_table_output, # This should be removed, returning DataFrame instead
837
+ anova_table_output, # This should be removed, returning DataFrame instead
838
+ download_all_plots_button, # Correct - returning file path for download button
839
+ download_excel_button # Correct - returning file path for download button
840
  ]
841
  )
842