Summarization
Transformers
PyTorch
TensorFlow
Safetensors
English
bart
text2text-generation
seq2seq
Eval Results (legacy)
Instructions to use knkarthick/MEETING_SUMMARY with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use knkarthick/MEETING_SUMMARY with Transformers:
# Use a pipeline as a high-level helper # Warning: Pipeline type "summarization" is no longer supported in transformers v5. # You must load the model directly (see below) or downgrade to v4.x with: # 'pip install "transformers<5.0.0' from transformers import pipeline pipe = pipeline("summarization", model="knkarthick/MEETING_SUMMARY")# Load model directly from transformers import AutoTokenizer, AutoModelForSeq2SeqLM tokenizer = AutoTokenizer.from_pretrained("knkarthick/MEETING_SUMMARY") model = AutoModelForSeq2SeqLM.from_pretrained("knkarthick/MEETING_SUMMARY") - Inference
- Notebooks
- Google Colab
- Kaggle
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