diff --git a/supervised/base_automl.py b/supervised/base_automl.py index da473d32..e06d15c1 100644 --- a/supervised/base_automl.py +++ b/supervised/base_automl.py @@ -47,17 +47,6 @@ from supervised.utils.metric import Metric, UserDefinedEvalMetric from supervised.utils.utils import dump_data, load_data -try: - import matplotlib.font_manager as font_manager - - # Get a list of all font families available on the system - font_families = font_manager.findSystemFonts() - - # Load the font file for the first font family in the list and get the name of the first font family - REPORT_FONT = font_manager.FontProperties(fname=font_families[0]).get_name() -except Exception: - REPORT_FONT = "Arial" - logger = logging.getLogger(__name__) logger.setLevel(LOG_LEVEL) @@ -2281,7 +2270,7 @@ def from_json(self, json_data): .styled-table {{ border-collapse: collapse; font-size: 0.9em; - font-family:Courier New; + font-family: Courier New; }} .styled-table td, .styled-table th {{ @@ -2302,8 +2291,7 @@ def from_json(self, json_data): }} body {{ - font-family: {REPORT_FONT}; - font-size: 1.0em; + font-family: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; background-color: rgba(236, 243, 249, 0.15); }} @@ -2404,7 +2392,7 @@ def _md_to_html(self, md_fname, page_type, dir_path, me=None): beginning = "" - if page_type == "main": + if page_type == "automl-report-main": beginning += """\n\n""" if os.path.exists(os.path.join(self._results_path, "optuna/README.md")):