Truncated output
Hi philschmid
I am trying to generate summary but in some cases when I add max length am getting truncated last sentence.Please can you let me know how this can be resolved.
Can you share your input and the generation arguments?
Input =Online food delivery platform Zomato has rolled out Zomato Pay, the latest and the third iteration of its dining out programme, in a few Indian cities, including New Delhi, Mumbai, Bengaluru, Ahmedabad and Kolkata.\n\nThis comes at a time when the food aggregators, including Zomato and rival Swiggy, have faced flak from restaurant operators for deep discounting.\n\nBack in August, the company had announced that it was recalibrating its loyalty programmes, and had closed new signups and renewals for its flagship programme Zomato Pro, as well as revising the terms of its co-branded credit card with RBL Bank.\n\nWith Zomato Pay, customers can now make payments at its partner restaurants using the Zomato Pay feature on the app and avail discounts and cashback offers, according to reports.\n\nZomato Pay, which is not a subscription product unlike Zomato Pro, also includes a 'Vibe Check' feature, which makes it easier for partner restaurants to promote themselves. The restaurants can post short videos β similar to Instagram stories β to improve the discovery of their locations.\n\nRecently, both Zomato and Swiggy have featured in world's 'Top 10' e-commerce-based food delivery companies.\n\nA report published by Canada-headquartered global research firm ETC Group titled 'Food Barons 2022 - Crisis Profiteering, Digitalization and Shifting Power' placed Swiggy and Zomato the 9th and 10th spot, respectively.\n\nThe most important part is that both of them are part of over 100 Indian unicorns. Unicorns are companies with a total value of over $1 billion.\n\nAs per the research firm, the food delivery sector refers to digital, on-demand platforms for ordering and paying for prepared food, groceries and other retail items. Restaurants/retailers fill the orders and couriers deliver them to customers within a prescribed timeframe.
Argument=
model = AutoModelForSeq2SeqLM.from_pretrained("philschmid/bart-large-cnn-samsum")
summarizer = pipeline("summarization", model="philschmid/bart-large-cnn-samsum",truncation=True)
f=summarizer(url_i.text, min_length=10, max_length=60)
Hi Phil Were you able to understand the issue?
Any solution to this ?