Ahmadzei's picture
added 3 more tables for large emb model
5fa1a76
You can also manually replicate the results of the pipeline if you'd like:
Tokenize the text and return the input_ids as PyTorch tensors:
from transformers import AutoTokenizer
tokenizer = AutoTokenizer.from_pretrained("stevhliu/my_awesome_billsum_model")
inputs = tokenizer(text, return_tensors="pt").input_ids
Use the [~transformers.generation_utils.GenerationMixin.generate] method to create the summarization.