Correction in notebook for Markdown code for running model locally without using API

Code provided in notebook

from transformers import pipeline

get_completion = pipeline("summarization", model="shleifer/distilbart-cnn-12-6")

def summarize(input):
    output = get_completion(input)
    return output[0]['summary_text']

it has a minor typo , so it fails the model name is incorrect , Please change it to below,
sshleifer/distilbart-cnn-12-6 s in the starting is missing

from transformers import pipeline

get_completion = pipeline("summarization", model="sshleifer/distilbart-cnn-12-6")

def summarize(input):
    output = get_completion(input)
    return output[0]['summary_text']

I am assuming admins of this course , will check this post.

2 Likes

Thanks Raja!