diff --git a/mlflow/recipes/cards/__init__.py b/mlflow/recipes/cards/__init__.py index ad3e0262fbcce..1a48318bd8110 100644 --- a/mlflow/recipes/cards/__init__.py +++ b/mlflow/recipes/cards/__init__.py @@ -237,9 +237,10 @@ def render_table(table, columns=None, hide_index=True): in the output HTML table. :param hide_index: Hide index column when rendering. """ + import html + import pandas as pd from pandas.io.formats.style import Styler - import html if not isinstance(table, Styler): table = pd.DataFrame(table, columns=columns)