- Notifications
You must be signed in to change notification settings - Fork328
pgml.transform() docs fixes#1428
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Merged
Uh oh!
There was an error while loading.Please reload this page.
Merged
Changes fromall commits
Commits
Show all changes
2 commits Select commitHold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Jump to file
Failed to load files.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
6 changes: 3 additions & 3 deletionspgml-cms/docs/SUMMARY.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
10 changes: 2 additions & 8 deletionspgml-cms/docs/api/sql-extension/pgml.embed.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
81 changes: 60 additions & 21 deletionspgml-cms/docs/api/sql-extension/pgml.transform/README.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
58 changes: 49 additions & 9 deletionspgml-cms/docs/api/sql-extension/pgml.transform/fill-mask.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
23 changes: 19 additions & 4 deletionspgml-cms/docs/api/sql-extension/pgml.transform/question-answering.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
57 changes: 25 additions & 32 deletionspgml-cms/docs/api/sql-extension/pgml.transform/summarization.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,53 +1,46 @@ | ||
--- | ||
description: Task of creating a condensed version of a document. | ||
--- | ||
# Summarization | ||
Summarization involves creating a condensed version of a document that includes the important information while reducing its length. Different models can be used for this task, with some models extracting the most relevant text from the original document, while other models generate completely new text that captures the essence of the original content. | ||
## Example | ||
{% tabs %} | ||
{% tab title="SQL" %} | ||
```sql | ||
SELECT pgml.transform( | ||
task => '{ | ||
"task": "summarization", | ||
"model": "google/pegasus-xsum" | ||
}'::JSONB, | ||
inputs => array[ | ||
'Paris is the capital and most populous city of France, with an estimated population of 2,175,601 residents as of 2018, | ||
in an area of more than 105 square kilometres (41 square miles). The City of Paris is the centre and seat of government | ||
of the region and province of Île-de-France, or Paris Region, which has an estimated population of 12,174,880, | ||
or about 18 percent of the population of France as of 2017.' | ||
] | ||
); | ||
``` | ||
{% endtab %} | ||
{% tab title="Result" %} | ||
```json | ||
[ | ||
{ | ||
"summary_text": "The CityofParisis the centre and seat of government of the region and province ofle-de-France, or Paris Region, whichhas an estimatedpopulation of 12,174,880, or about18 percent of the population of France as of 2017." | ||
} | ||
] | ||
``` | ||
{% endtab %} | ||
{% endtabs %} | ||
### Additional resources | ||
- [Hugging Face documentation](https://huggingface.co/tasks/summarization) | ||
- [google/pegasus-xsum](https://huggingface.co/google/pegasus-xsum) |
Oops, something went wrong.
Uh oh!
There was an error while loading.Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.