Buckets:
Summarization
Summarization is the task of producing a shorter version of a document while preserving its important information. Some models can extract text from the original input, while other models can generate entirely new text.
For more details about the
summarizationtask, check out its dedicated page! You will find examples and related materials.
Recommended models
- facebook/bart-large-cnn: A strong summarization model trained on English news articles. Excels at generating factual summaries.
- Falconsai/medical_summarization: A summarization model trained on medical articles.
Explore all available models and find the one that suits you best here, or from the terminal with the hf CLI:
hf models ls --warm --pipeline-tag summarization --sort trending_score
Using the API
<InferenceSnippet pipeline=summarization providersMapping={ {"hf-inference":{"modelId":"human-centered-summarization/financial-summarization-pegasus","providerModelId":"human-centered-summarization/financial-summarization-pegasus"}} } />
API specification
Request
| Headers | ||
|---|---|---|
| authorization | string | Authentication header in the form 'Bearer: hf_****' when hf_**** is a personal user access token with "Inference Providers" permission. You can generate one from your settings page. |
| Payload | ||
|---|---|---|
| inputs* | string | The input text to summarize. |
| parameters | object | |
| clean_up_tokenization_spaces | boolean | Whether to clean up the potential extra spaces in the text output. |
| truncation | enum | Possible values: do_not_truncate, longest_first, only_first, only_second. |
| generate_parameters | object | Additional parametrization of the text generation algorithm. |
Response
| Body | | | :--- | :--- | :--- | | summary_text | string | The summarized text. |
Xet Storage Details
- Size:
- 2.53 kB
- Xet hash:
- 14cbe9613bab6f0a8f36d549d9310ae04ee74f124839aa22e213aacc8e425a94
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.