AttributeError: 'list' object has no attribute 'train'

Hi, I am using the model card toolkit for the generation of model card.
I am using the Scikit-Learn Model Card Toolkit Demo . I run this template on Google Colab, it works fine, but when I run it on my local jyoter notebook, it gives the following error.,

ttributeError: ‘list’ object has no attribute 'train’

This is complete code.

mct = ModelCardToolkit()
model_card = mct.scaffold_assets() = ‘Breast Cancer Wisconsin (Diagnostic) Dataset’
model_card.model_details.overview = (
'This model predicts whether breast cancer is benign or malignant based on ’
‘image measurements.’)
model_card.model_details.owners = [
{‘name’: ‘Model Cards Team’, ‘contact’: ‘’}
model_card.model_details.references = [
UCI Machine Learning Repository: Breast Cancer Wisconsin (Diagnostic) Data Set’,
] = str(uuid.uuid4()) = str(

model_card.considerations.ethical_considerations = [{
‘name’: ('Manual selection of image sections to digitize could create ’
‘selection bias’),
‘mitigation_strategy’: ‘Automate the selection process’
model_card.considerations.limitations = [‘Breast cancer diagnosis’]
model_card.considerations.use_cases = [‘Breast cancer diagnosis’]
model_card.considerations.users = [‘Medical professionals’, ‘ML researchers’]

print(dir( = (
f’{len(X_train)} rows with {len(X_train.columns)} features’) = [
{‘image’: mean_radius_train},
{‘image’: mean_texture_train}
] = (
f’{len(X_test)} rows with {len(X_test.columns)} features’) = [
{‘image’: mean_radius_test},
{‘image’: mean_texture_test}
] = (
‘ROC curve and confusion matrix’) = [
{‘image’: roc_curve},
{‘image’: confusion_matrix}


AttributeError Traceback (most recent call last)
25 print(dir(
26 = (
—> 27 f’{len(X_train)} rows with {len(X_train.columns)} features’)
28 = [
29 {‘image’: mean_radius_train},

AttributeError: ‘list’ object has no attribute ‘train’