Joschka Strueber commited on
Commit
b18c9e2
·
1 Parent(s): cca1790

[Fix] heatmap not generated and deselection causes error

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -30,7 +30,7 @@ def create_heatmap(selected_models, selected_dataset):
30
  )
31
 
32
  print("Heatmap generated successfully") # Debugging
33
- return gr.Plot.update(value=fig, visible=True)
34
 
35
  def validate_inputs(selected_models, selected_dataset):
36
  if not selected_models:
@@ -76,7 +76,7 @@ with gr.Blocks(title="LLM Similarity Analyzer") as demo:
76
  # Clear button
77
  clear_btn = gr.Button("Clear Selection")
78
  clear_btn.click(
79
- lambda: [None, None, gr.Plot.update(visible=False)],
80
  outputs=[model_dropdown, dataset_dropdown, heatmap]
81
  )
82
 
 
30
  )
31
 
32
  print("Heatmap generated successfully") # Debugging
33
+ return fig
34
 
35
  def validate_inputs(selected_models, selected_dataset):
36
  if not selected_models:
 
76
  # Clear button
77
  clear_btn = gr.Button("Clear Selection")
78
  clear_btn.click(
79
+ lambda: [None, None, None],
80
  outputs=[model_dropdown, dataset_dropdown, heatmap]
81
  )
82