Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/thecomputeguy/ai-summarizer

An API that uses GPT-3 to summarize text, aimed at educational applications
https://github.com/thecomputeguy/ai-summarizer

flask gpt-3 nltk

Last synced: 2 months ago
JSON representation

An API that uses GPT-3 to summarize text, aimed at educational applications

Awesome Lists containing this project

README

        

# Saransh - Text Summarizer

This tool exposes an API to summarize large text inputs into byte-sized chunks. It uses OpenAIs GPT-3 model to accomplish this.


## Try it out

Try out the API with our [demo backend](https://ai-summarizer.herokuapp.com/) or from our [webapp](https://paulfaraday.github.io/ai-summarizer/)

## Installing

Start with cloning this repo

### [Optional - Recommended] Using a virtual environment

Install and setup virtual environment
```
pip install virtualenv

virtualenv venv
```

To activate your virtualenv
```
source ./venv/bin/activate
```

To exit the virtual environment
```
deactivate
```

### App setup

Install the required dependencies
```
pip install -r requirements.txt
```

## Running in local

### Environment variables

Add the following environment variables for the app to work:

| Variable | Description |
|----------|-------------|
|OPENAI_API_KEY|The OpenAI API key. [Generate here](https://openai.com/api/)|

### Debug mode

```
python main.py
```

### Non-debug mode

```
python app.py
```

## API Documentation

To check app health, go to `:/` or `:/isAlive`

Detailed API documentation for the summary endpoints is available in `docs` folder in the repo

| Endpoint | Documentation |
|----------|---------------|
|/summary|text_summary.md|
|/pdfSummary|pdf_summary.md|