An API that provides text summarization services in both English and German.
Report Bug
·
Request Feature
Table of Contents
VADIS Summarization API is an easy-to-use API that provides automatic text summarization services in both English and German. It processes individual documents, detects their language, and summarizes them accordingly. If the input document is in German, it will first translate it to English before summarizing.
- Input: A text document that can be in either English or German.
- Output: A summarized version of the input document, available in English (if the input is German, it will be translated first).
- Noteworthy Feature: The API automatically detects the language of the input text and, if necessary, translates German input into English for summarization.
- Demo: You can interact with the API by visiting http://127.0.0.1:8000/docs.
For more information on the underlying summarization models and translation mechanisms, check the documentation at VADIS GitHub Repository.
Follow these steps to get a local copy of the VADIS Summarization API up and running on your machine.
Before you begin, ensure that you have the following installed:
- Python 3.10
- Poetry (A package manager for Python projects)
- Install Poetry by following the official documentation
- Clone the repository:
git clone [email protected]:vadis-project/vadis_summarization_api.git
- Navigate into the project directory:
cd vadis_summarization_api
- Install the project dependencies using Poetry:
poetry install
The API loads its configuration from a .env
file. You can start by copying the sample configuration file:
cp ./sample.env ./.env
You can customize the following settings:
AUTH_KEY
: Set this to any string. You will need this key when accessing the API.LANGUAGE
: Set this to eitheren
(English) orde
(German). This determines the language of the summaries. If you choosede
, the API will summarize in English, even if the input is in German.
Start the API within the virtual environment created by Poetry:
poetry run uvicorn vadis_summarization_api.main:app
This will start the API, and it may take some time for the first run as models need to be downloaded.
Once the API is running, you can access the automatically generated documentation and interact with the API directly at http://127.0.0.1:8000/docs.
You can call it to generate summaries. Following is one example which uses curl command.
curl -X 'POST' \
'http://127.0.0.1:8000/summarize' \
-H 'accept: application/json' \
-H 'auth-key: YOUR-AUTH-KEY' \
-H 'Content-Type: application/json' \
-d '{
"documents": [
"TEXT OF THE PAPER TO BE SUMMARIZED",
"YOU CAN SUMMARIZE MORE THAN ONE PAPER IN ONE API CALL"
]
}'
The /summarize
endpoint detects the language of the input document. If the document is in German, it will first translate the text to English before summarizing it.
- Improve summarization models for better accuracy
Distributed under the MIT License. See LICENSE
for more information.
For any questions or inquiries, please feel free to raise an issue in this repository or contact me at
Sotaro Takeshita - [email protected]