from transformers import pipeline

generator = pipeline("text-generation", model="distilgpt2")

def explain_feature(feature, corr, importance):
    prompt = f"{feature} is a feature with correlation {corr} and importance {importance}. It is"

    result = generator(
        prompt,
        max_new_tokens=30,
        do_sample=True,
        temperature=0.7
    )

    text = result[0]['generated_text']
    return text.replace(prompt, "").strip()