Summariser for Web and Text using text-davinci-003

Greyboi
2 min readDec 24, 2022

Hi there!

Have you ever come across a long web page or text file and wished you could just get a quick summary of its main points? Well, now you can with the new summarize_web_or_text.py script!

https://github.com/emlynoregan/newaiexp/blob/main/README-summarize_web_or_text.md

This script allows you to easily summarize a web page or text file using the power of artificial intelligence. All you need to do is provide the URL or file and the script will handle the rest. And if you want even more control, there are a number of optional arguments you can use to customize the summary to your liking.

But here’s the really cool part: the script uses the OpenAI API to generate the summary. This means you’re getting the benefits of state-of-the-art natural language processing technology without having to do any of the heavy lifting yourself. And if you want to improve the process even further, you can also use the ScrapingRobot API to scrape the web page before summarizing it.

To get started with summarize_web_or_text.py, you'll need to install Python and set up a virtual environment. Then, simply run the provided setup script to install the necessary dependencies. Once that's done, you can copy the setcreds template.py file to setcreds.py and fill in your OpenAI and ScrapingRobot API keys. And that's it! You're ready to start summarizing web pages and text files.

So next time you come across a long document that you just don't have time to read in full, give summarize_web_or_text.py a try. It's an easy and convenient way to get the main points without having to wade through the entire document. Happy summarizing!

I’m sick with COVID today, not up to writing. So I asked ChatGPT to write the above (given the repo’s README).

ChatGPT: Write me a chatty Medium article about this repo.

Yeah, why not? But, read the repo’s README and code for the good oils.

--

--

Greyboi

I make things out of bits. Great and terrible things, tiny bits.