24.5 hugging summarize

Summarise the content of a post on the Internet:

ml summarize hugging https://www.abc.net.au/news/2022-09-22/nasa-releases-clearest-view-of-neptunes-rings-in-decades/101466864

Note the first time this may download the models if they have yet to be downloaded.

The new webb image also clearly shows Neptune's fainter dust bands. 
Some of the planet's rings have not been detected since 1989. 
Webb's images show the ice giant in a whole new light.

Summarise another post on the Internet:

ml summarize hugging https://www.abc.net.au/news/2022-08-16/morrison-secret-ministerial-appointments-legal-or-not-icac/101318718
Former ICAC assistant commissioner says many questions remain unanswered.
He hinted that there could be more ministries that Mr Morrison secretly appointed himself to.
Independent crossbencher said she was alarmed by the secret appointments.

Use BART rather than the default t5-small summary model:

ml summarize hugging --mode=bart https://www.abc.net.au/news/2022-08-16/morrison-secret-ministerial-appointments-legal-or-not-icac/101318718
Scott Morrison's secret ministerial appointments likely legal and outside federal ICAC remit, experts say.
Independent MPs say the former prime minister's actions should be investigated by a federal integrity body.
A former NSW ICAC assistant commissioner says many questions remain unanswered.
Prime Minister Anthony Albanese is expected to provide an update today after receiving briefings from the.

TODO

Use in a pipeline to get the sentiment of the first sentence:

ml summarize hugging https://www.abc.net.au/news/2022-09-22/nasa-releases-clearest-view-of-neptunes-rings-in-decades/101466864 | head -1 | ml sentiment hugging

Or do this for all sentences

ml summarize hugging https://www.abc.net.au/news/2022-09-22/nasa-releases-clearest-view-of-neptunes-rings-in-decades/101466864 |  xargs -I@ bash -c 'ml sentiment hugging @'
$ ml summarize hugging https://www.abc.net.au/news/2022-09-22/nasa-releases-clearest-view-of-neptunes-rings-in-decades/101466864 | head -1 > tmp.txt
$ ml sentiment hugging tmp.txt

Choice of Model

Default is t5-small

ml summarize hugging https://www.abc.net.au/news/2022-09-22/nasa-releases-clearest-view-of-neptunes-rings-in-decades/101466864
The new webb image also clearly shows Neptune's fainter dust bands. 
Some of the planet's rings have not been detected since 1989. 
Webb's images show the ice giant in a whole new light.

We can instead choose BART:

ml summarize hugging https://www.abc.net.au/news/2022-09-22/nasa-releases-clearest-view-of-neptunes-rings-in-decades/101466864 --model=bart
NASA releases clearest view of Neptune's rings in decades. 
James Webb Space Telescope captures the clearest views of Neptune in more than 30 years. 
Some of the planet's rings have not been detected since NASA's Voyager 2 became the first spacecraft to observe Neptune during its flyby in 1989.

Other options are t5-large (3GB model) and t5-base (900MB model).



Your donation will support ongoing availability and give you access to the PDF version of this book. Desktop Survival Guides include Data Science, GNU/Linux, and MLHub. Books available on Amazon include Data Mining with Rattle and Essentials of Data Science. Popular open source software includes rattle, wajig, and mlhub. Hosted by Togaware, a pioneer of free and open source software since 1984. Copyright © 1995-2022 Graham.Williams@togaware.com Creative Commons Attribution-ShareAlike 4.0