aigurletov commited on
Commit
ab3618c
·
1 Parent(s): ee4ec14
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -127,8 +127,9 @@ def run_simulation_interface(ruleset_file, chain_files, iteration_count, initial
127
  df.to_csv(csv_buffer, index=False)
128
  csv_bytes = csv_buffer.getvalue().encode('utf-8')
129
 
130
- # FIX: Use gr.update() to update component properties
131
- return df, stats_report, gr.update(value=csv_bytes, visible=True, name=df_path), gr.update(value=stats_report.encode('utf-8'), visible=True, name=report_path)
 
132
 
133
  # --- COST CALCULATION LOGIC ---
134
  def run_cost_calculation_logic(chain_files, item_files):
 
127
  df.to_csv(csv_buffer, index=False)
128
  csv_bytes = csv_buffer.getvalue().encode('utf-8')
129
 
130
+ # FIX: Removed the 'name' keyword argument from gr.update for the File component
131
+ # as it causes a TypeError in recent Gradio versions.
132
+ return df, stats_report, gr.update(value=csv_bytes, visible=True), gr.update(value=stats_report.encode('utf-8'), visible=True)
133
 
134
  # --- COST CALCULATION LOGIC ---
135
  def run_cost_calculation_logic(chain_files, item_files):