Downloads · 30 days
3
23% of all-time downloads
Mudasir692/peguses_chat_sum
peguses_chat_sum is a machine learning model from Mudasir692. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
This modelcard aims to be a base template for new models. It has been generated using this raw template.
Downloads · 30 days
3
23% of all-time downloads
All-time downloads
13
Public
Parameters
571M
2.3 GB on disk
Likes
1
Public
Click a slice to open those files.
.safetensors2.3 GB · 100%
From the Hugging Face model README
This modelcard aims to be a base template for new models. It has been generated using this raw template.
Model might not generate coherent summary to large extent.
[More Information Needed]
Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations.
import torch from transformers import PegasusForConditionalGeneration, PegasusTokenizer
model_path = "peguses_chat_sum" device = torch.device("cpu")
model = PegasusForConditionalGeneration.from_pretrained(model_path) tokenizer = PegasusTokenizer.from_pretrained(model_path)
model = model.to(device)
from transformers import PegasusForConditionalGeneration, PegasusTokenizer
model = PegasusForConditionalGeneration.from_pretrained("Mudasir692/peguses_chat_sum") tokenizer = PegasusTokenizer.from_pretrained("Mudasir692/peguses_chat_sum") input_text = """ #Person1#: Hey Alice, congratulations on your promotion! #Person2#: Thank you so much! It means a lot to me. I’m still processing it, honestly. #Person1#: You totally deserve it. Your hard work finally paid off. Let’s celebrate this weekend. #Person2#: That sounds amazing. Dinner on me, okay? #Person1#: Sure! Just let me know where and when. Oh, by the way, did you tell your family? #Person2#: Yes, they were so excited. Mom’s already planning to bake a cake. #Person1#: That’s wonderful! I’ll bring a gift too. It’s such a big milestone for you. #Person2#: You’re the best. Thanks for always being so supportive. """ inputs = tokenizer(input_text, return_tensors="pt") model.eval() outputs = model.generate(**inputs, max_new_tokens=100) generated_summary = tokenizer.decode(outputs[0], skip_special_tokens=True) print("generated summary", generated_summary)