Downloads · 30 days
20
2% of all-time downloads
Lin0He/text-summary-gpt2-short
text-summary-gpt2-short is a summarization model from Lin0He. Use it when you need a shorter version of a longer text. It is set up for transformers. The card lists the license as mit.
!!! The previous pipeline has been destroyed by a system update of hugging face. !!! In the updated pipeline, the generated text may show like:
Downloads · 30 days
20
2% of all-time downloads
All-time downloads
1.3K
Public
Repo size
2.5 GB
Likes
0
Public
Click a slice to open those files.
.pth1 GB · 67%
From the Hugging Face model README
!!! The previous pipeline has been destroyed by a system update of hugging face. !!! In the updated pipeline, the generated text may show like:
Today was a beautiful day, I have done all my homework. I wonder is this I need? Thank you so much for your help.TL;DRThank You
please filter the result by TL;DR.
This is the project for the course Multimedia System in Leiden University 2023 fall. The model is part of self-designed software for the final project that summarizes short texts. The original summarization model is from https://towardsdatascience.com/text-summarization-with-gpt2-and-layer-ai-599625085d8e .
Due to the technique support of hugging face, this project can only functioning with Interface code below. When you first call the API, it may take more than 1 minutes to download the model and functioning. Please wait carefully, thank you!
You can check "text_summary.py" in the uploaded documents, and download the model to test and modify this task.
please see the announcement above.
import requests
API_URL = "https://api-inference.huggingface.co/models/Lin0He/text-summary-gpt2-short"
headers = {"Authorization": "Bearer <Your API tokens>"}
def query(payload):
response = requests.post(API_URL, headers=headers, json=payload)
return response.json()
output = query({
"inputs": "Today was a beautiful day. I have down all my homework, and baked some cookies with my friends. What a lovely day."
})
print(output)