@@ -282,10 +282,10 @@ def _get_byproduct_cf_plot(self):
282
282
][0 ]
283
283
source = ColumnDataSource (self .cf_data_source )
284
284
plot = figure (
285
- sizing_mode = "stretch_both" ,
286
285
title = "Available Counterfactuals" ,
287
286
tools = ["crosshair" ],
288
287
tooltips = "@{{Tooltip {}}}" .format (output_name ),
288
+ sizing_mode = "stretch_both" ,
289
289
)
290
290
plot .xgrid .grid_line_color = None
291
291
plot .xaxis .axis_label = "Counterfactual House Value"
@@ -328,19 +328,27 @@ def _get_plots(self):
328
328
tabs = [
329
329
TabPanel (child = lime_figures [k ], title = "LIME" ),
330
330
TabPanel (
331
- child = Div (text = LIME_TEXT .format (output_html (title ))),
331
+ child = Div (
332
+ text = LIME_TEXT .format (output_html (title )),
333
+ styles = {"overflow-y" : "scroll" },
334
+ ),
332
335
title = "About LIME" ,
333
336
),
334
- ]
337
+ ],
338
+ sizing_mode = "stretch_both" ,
335
339
)
336
340
shap_tabbed = Tabs (
337
341
tabs = [
338
342
TabPanel (child = shap_figures [k ], title = "SHAP" ),
339
343
TabPanel (
340
- child = Div (text = SHAP_TEXT .format (output_html (title ))),
344
+ child = Div (
345
+ text = SHAP_TEXT .format (output_html (title )),
346
+ styles = {"overflow-y" : "scroll" },
347
+ ),
341
348
title = "About SHAP" ,
342
349
),
343
- ]
350
+ ],
351
+ sizing_mode = "stretch_both" ,
344
352
)
345
353
346
354
cf_tabbed = Tabs (
@@ -352,15 +360,19 @@ def _get_plots(self):
352
360
),
353
361
title = "About Counterfactuals" ,
354
362
),
355
- ]
363
+ ],
364
+ sizing_mode = "stretch_both" ,
356
365
)
357
366
367
+ # trustyai_content = row(column(lime_tabbed, shap_tabbed), cf_tabbed)
368
+
358
369
trustyai_content = GridBox (
359
370
children = [
360
371
(lime_tabbed , 0 , 0 , 1 , 1 ),
361
372
(shap_tabbed , 1 , 0 , 1 , 1 ),
362
373
(cf_tabbed , 0 , 1 , 2 , 2 ),
363
- ]
374
+ ],
375
+ sizing_mode = "stretch_width" ,
364
376
)
365
377
joint = column (
366
378
Div (
@@ -369,11 +381,10 @@ def _get_plots(self):
369
381
)
370
382
),
371
383
trustyai_content ,
372
- sizing_mode = "scale_width" ,
373
384
)
374
385
tabs .append (TabPanel (child = joint , title = title ))
375
386
376
- full_dash = Tabs (tabs = tabs , sizing_mode = "scale_width " )
387
+ full_dash = Tabs (tabs = tabs , sizing_mode = "scale_both " )
377
388
return full_dash
378
389
379
390
def run (self , display = True ):
0 commit comments