reab5555 commited on
Commit
0c982ed
·
verified ·
1 Parent(s): 91bc979

Update visualization.py

Browse files
Files changed (1) hide show
  1. visualization.py +3 -3
visualization.py CHANGED
@@ -41,12 +41,12 @@ def update_visibility_and_charts(status, exec_time, lang, attachments, bigfive,
41
  for speaker, data in speakers_data.items():
42
  if data:
43
  fig = create_bar_chart(data, f"{analysis_type} Analysis - {speaker}")
44
- outputs.append(fig)
45
- outputs.append(explanation)
46
 
47
  # Pad the outputs to ensure we always return the same number of outputs
48
  while len(outputs) < 15: # 3 initial outputs + 6 plots + 6 explanations
49
- outputs.append(None)
50
 
51
  print("Outputs generated:", outputs)
52
  return outputs
 
41
  for speaker, data in speakers_data.items():
42
  if data:
43
  fig = create_bar_chart(data, f"{analysis_type} Analysis - {speaker}")
44
+ outputs.append(gr.Plot.update(value=fig, visible=True))
45
+ outputs.append(gr.Textbox.update(value=explanation, visible=True, label=f"{analysis_type} Explanation - {speaker}"))
46
 
47
  # Pad the outputs to ensure we always return the same number of outputs
48
  while len(outputs) < 15: # 3 initial outputs + 6 plots + 6 explanations
49
+ outputs.append(gr.update(visible=False))
50
 
51
  print("Outputs generated:", outputs)
52
  return outputs