pavanmutha commited on
Commit
7713d90
·
verified ·
1 Parent(s): f0493c5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -1
app.py CHANGED
@@ -368,9 +368,14 @@ def explainability(_):
368
  return shap_path, lime_path
369
 
370
  # Define this BEFORE the Gradio app layout
 
371
  def update_target_choices():
372
  global df_global
373
- return gr.update(choices=df_global.columns.tolist())
 
 
 
 
374
 
375
  with gr.Blocks() as demo:
376
  gr.Markdown("## 📊 AI-Powered Data Analysis with Hyperparameter Optimization")
 
368
  return shap_path, lime_path
369
 
370
  # Define this BEFORE the Gradio app layout
371
+
372
  def update_target_choices():
373
  global df_global
374
+ if df_global is not None:
375
+ return gr.update(choices=df_global.columns.tolist())
376
+ else:
377
+ return gr.update(choices=[])
378
+
379
 
380
  with gr.Blocks() as demo:
381
  gr.Markdown("## 📊 AI-Powered Data Analysis with Hyperparameter Optimization")