Giter Site home page Giter Site logo

alexandrevl / supersummarizeai Goto Github PK

View Code? Open in Web Editor NEW
13.0 1.0 2.0 1.44 MB

Unleash the power of AI with SuperSummarizeAI! Effortlessly extract, condense, and clip content from webpages and YouTube videos using ChatGPT. Turning endless streams of content into digestible summaries.

License: MIT License

Python 100.00%
beautifulsoup chatgpt content-analysis multilingual nlp openai text text-processing text-summarization web-scraping

supersummarizeai's Introduction

SuperSummarizeAI

Description

SuperSummarizeAI is a versatile Python tool designed to extract and summarize textual content. Whether it's from a provided webpage URL, a YouTube video link, or a PDF file, this tool processes the content through ChatGPT to generate an insightful summary. Once the summary is ready, the tool copies the content directly to your clipboard for quick access and sharing. Additionally, with its multilingual capabilities, SuperSummarizeAI can cater to a global audience, generating summaries in various languages.

Installation

Using pip (Recommended for all platforms)

  1. Install SuperSummarizeAI using pip:
pip install ssai
  1. Set your OpenAI key using the following command, replacing YOUR_OPENAI_KEY with your actual OpenAI key (You can get one here):
ssai --OPENAI_KEY=YOUR_OPENAI_KEY

Using Homebrew (macOS)

  1. Tap into the SuperSummarizeAI repository:
brew tap alexandrevl/supersummarizeai
  1. Install SuperSummarizeAI:
brew install ssai
  1. Set your OpenAI key using the following command, replacing YOUR_OPENAI_KEY with your actual OpenAI key (You can get one here):
ssai --OPENAI_KEY=YOUR_OPENAI_KEY

Manual Installation

  1. Ensure you have Python 3 installed on your system.
  2. Clone the repository to your local machine:
git clone https://github.com/alexandrevl/SuperSummarizeAI.git
  1. Navigate to the cloned directory:
cd SuperSummarizeAI
  1. Install the required packages using pip:
pip install -r requirements.txt
  1. Set your OpenAI key using the following command, replacing YOUR_OPENAI_KEY with your actual OpenAI key (You can get one here):
python ssai.py --OPENAI_KEY=YOUR_OPENAI_KEY

For security reasons, always ensure that your .env file remains confidential. Do not share or expose it as it contains sensitive API credentials.

Usage

If Installed via pip or Homebrew:

Simply provide the desired URL (webpage or YouTube video) or PDF file as a command-line argument:

ssai <TARGET>

For instance:

ssai https://example.com

or

ssai MY_PDF.pdf

For multilingual summaries, specify your desired language using the --lang option (default is 'brazilian portuguese'):

ssai <TARGET> --lang <desired_language>

For instance:

ssai https://example.com --lang english

For adding context to the AI, use the --context option:

ssai <TARGET> --context <context>

For instance:

ssai https://youtube.com/watch?v=example --context "The name of the presenter is John Doe"

For more information on the available options, run:

ssai --help

If Installed Manually:

To employ SuperSummarizeAI, provide the desired URL (webpage or YouTube video) or PDF file as a command-line argument:

python ssai.py <TARGET>

For instance:

python ssai.py https://example.com

or

python ssai.py MY_PDF.pdf

For multilingual summaries, specify your desired language using the --lang option (default is 'brazilian portuguese'):

python ssai.py <TARGET> --lang <desired_language>

For instance:

python ssai.py https://example.com --lang english

For give a context to the AI, use the --context option:

python ssai.py <TARGET> --context <context>

For instance:

python ssai.py https://youtube.com/watch?v=example --context "The name of presenter is John Doe"

For more information on the available options, run:

python ssai.py --help

📸 Examples

See SuperSummarizeAI in action:

Webpage Summarization:

Example of webpage summarization

YouTube Video Summarization:

Example of YouTube video summarization

Troubleshooting

  • TARGET Input: Make sure the URL you input is correctly formatted and always begins with http:// or https://. For PDF files, ensure the file is in the same directory as the script or provide the full path to the file.
  • Dependencies: Double-check to ensure all required dependencies are correctly installed. If you encounter any errors, try reinstalling the dependencies using pip install -r requirements.txt.

Contributing

Interested in contributing to SuperSummarizeAI? We'd love to collaborate! Please initiate by opening an issue to discuss the changes you'd like to make.

License

Licensed under MIT.

supersummarizeai's People

Contributors

alexandrevl avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

supersummarizeai's Issues

zsh: no matches found: https://www.youtube.com/watch?v=wuk8Tx5LmlY

Erro when trying to summarize an YouTube video.

~ % ssai https://www.youtube.com/watch?v=wuk8Tx5LmlY
zsh: no matches found: https://www.youtube.com/watch?v=wuk8Tx5LmlY

System Info:

Nome do Modelo:	MacBook Air
Identificador do Modelo:	Mac14,2
Nº do Modelo:	MLY13LL/A
Chip:	Apple M2
Número Total de Núcleos:	8 (4 desempenho e 4 eficiência)
Memória:	8 GB
Versão do Firmware do Sistema:	10151.61.4
Versão do Carregador do OS:	10151.61.4


Versão do Sistema:	macOS 14.2 (23C5055b)
Versão de Kernel:	Darwin 23.2.0
Volume de Inicialização:	Macintosh HD
Modo Inicialização:	Normal
Memória Virtual Segura:	Ativada
Proteção de Integridade do Sistema:	Ativada
Tempo desde a inicialização:	2 horas e 58 minutos

openai.ChatCompletion no longer supported

The error is self-explanatory:

% ssai http://bb.com.br
Extracting data from: http://bb.com.br
Data extracted (website)
Creating ChatGPT summary in brazilian portuguese. This may take a while...
ChatGPT summary done
Error:  Expecting value: line 1 column 1 (char 0)
-------------------
Error

Error: 

You tried to access openai.ChatCompletion, but this is no longer supported in openai>=1.0.0 - see the README at https://github.com/openai/openai-python for the API.

You can run `openai migrate` to automatically upgrade your codebase to use the 1.0.0 interface. 

Alternatively, you can pin your installation to the old version, e.g. `pip install openai==0.28`

A detailed migration guide is available here: https://github.com/openai/openai-python/discussions/742

http://bb.com.br
-------------------
Copied to clipboard

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.