From c9c65e320de047f56d9fcaba298c33592a0f1c64 Mon Sep 17 00:00:00 2001 From: Jesus Darias <71895708+jesusdarias@users.noreply.github.com> Date: Wed, 12 Jun 2024 17:57:21 +0200 Subject: [PATCH] Image size lime fix --- resources/explainers/tabular/lime.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/resources/explainers/tabular/lime.py b/resources/explainers/tabular/lime.py index 119819f..4f6becd 100644 --- a/resources/explainers/tabular/lime.py +++ b/resources/explainers/tabular/lime.py @@ -161,10 +161,9 @@ def predict(X): hti = Html2Image() hti.output_path= os.getcwd() - size=(10, 4) css="body {background: white;}" if "png_height" in params_json and "png_width" in params_json: - size=(int(params_json["png_width"])/100,int(params_json["png_height"])/100) + size=(int(params_json["png_width"]),int(params_json["png_height"])) hti.screenshot(html_str=explanation.as_html(),css_str=css, save_as="temp.png", size=size) else: hti.screenshot(html_str=explanation.as_html(),css_str=css, save_as="temp.png",size=(1300,350))