Ryan commited on
Commit
2031ee5
·
1 Parent(s): 905bfbb
.idea/workspace.xml CHANGED
@@ -63,7 +63,7 @@
63
  <option name="presentableId" value="Default" />
64
  <updated>1745170754325</updated>
65
  <workItem from="1745170755404" duration="245000" />
66
- <workItem from="1745172030020" duration="19397000" />
67
  </task>
68
  <servers />
69
  </component>
 
63
  <option name="presentableId" value="Default" />
64
  <updated>1745170754325</updated>
65
  <workItem from="1745170755404" duration="245000" />
66
+ <workItem from="1745172030020" duration="20108000" />
67
  </task>
68
  <servers />
69
  </component>
processors/bias_processor.py CHANGED
@@ -153,13 +153,11 @@ The overall bias difference is {bias_results['comparative']['overall']['differen
153
  height=400
154
  )
155
 
156
- # Return all components together
157
- visualization_components = [
158
- gr.Markdown(results_markdown), # Wrap text in gr.Markdown
159
- gr.Plot(fig1), # Wrap plotly figure in gr.Plot
160
- gr.Plot(fig2), # Wrap plotly figure in gr.Plot
161
- gr.Plot(fig3) # Wrap plotly figure in gr.Plot
162
- ]
163
 
164
  return (
165
  analysis_results, # analysis_results_state
@@ -179,7 +177,10 @@ The overall bias difference is {bias_results['comparative']['overall']['differen
179
  gr.update(visible=False), # similarity_metrics
180
  False, # status_message_visible
181
  gr.update(visible=False), # status_message
182
- visualization_components # visualization components
 
 
 
183
  )
184
 
185
  except Exception as e:
@@ -200,5 +201,8 @@ The overall bias difference is {bias_results['comparative']['overall']['differen
200
  gr.update(visible=False),
201
  True,
202
  gr.update(visible=True, value=f"❌ **Error generating bias visualization:** {str(e)}"),
203
- gr.update(visible=False) # bias_visualizations
 
 
 
204
  )
 
153
  height=400
154
  )
155
 
156
+ # Create individual components for results rather than trying to return a Column
157
+ markdown_component = results_markdown
158
+ plot1 = fig1
159
+ plot2 = fig2
160
+ plot3 = fig3
 
 
161
 
162
  return (
163
  analysis_results, # analysis_results_state
 
177
  gr.update(visible=False), # similarity_metrics
178
  False, # status_message_visible
179
  gr.update(visible=False), # status_message
180
+ markdown_component, # Instead of returning a list, return individual components
181
+ plot1,
182
+ plot2,
183
+ plot3
184
  )
185
 
186
  except Exception as e:
 
201
  gr.update(visible=False),
202
  True,
203
  gr.update(visible=True, value=f"❌ **Error generating bias visualization:** {str(e)}"),
204
+ "", # Return empty strings for visualization components instead of None
205
+ None,
206
+ None,
207
+ None
208
  )