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

https://github.com/peterk/swebert-summarize

A tiny NLP demo on how to summarize swedish texts using the BERT model from the National Library of Sweden.
https://github.com/peterk/swebert-summarize

bert-model docker nlp-machine-learning python

Last synced: 6 months ago
JSON representation

A tiny NLP demo on how to summarize swedish texts using the BERT model from the National Library of Sweden.

Awesome Lists containing this project

README

          

# swebert-summarize
A tiny demo on how to summarize swedish texts using the [BERT model from the National Library of Sweden](https://github.com/Kungbib/swedish-bert-models). It uses the [Bert Extractive Summarizer library](https://pypi.org/project/bert-extractive-summarizer/).

Install requirements:

```pip install -r requirements.txt```

Run it with

```python summarize.py my_long_text.txt```

# Simple web gui
A simple web gui in Flask is provided for testing. To run it, install Docker and docker-compose.

To run it:

```docker-compose up -d```

On the first run the BERT-model is downloaded (this may take several minutes). The ser ver will be available on 0.0.0.0:80.