No effect of max_length when calling summarizer

#5
by vishnoor - opened

I keep getting this error even if I specify the max_length while calling the summarize. What am I doing wrong

Your max_length is set to 30, but your input_length is only 16. You might consider decreasing max_length manually, e.g. summarizer('...', max_length=8)

The relevant lines of code are
[code]
if not text.startswith("Profile picture of"):
p_max_length = len(text) + 1
summarizer(text, max_length = p_max_length) <--- Issue here
[/code]

max_length is to truncate the input. when your input is less than max_length, you can't truncate, you need to pad.

knkarthick changed discussion status to closed

Sign up or log in to comment