This provides an easy REST API for text summarization.
Ensure you have Rust and Cargo installed. If not, follow the instructions here.
-
Clone this repository:
git clone https://github.com/benjaminjacobberg/synopsis/
-
Navigate to the project directory:
cd synopis/synopsis-service
-
Run:
cargo run
The API server will start at http://localhost:8080
.
To summarize a piece of text, send a POST request to the /api/summarize
endpoint with your text in the request body. Here's a sample curl
command:
curl --request POST \
--url http://localhost:8080/api/summarize \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data '{"text": "Your lengthy text here...", "range": {"min": 50, "max": 100}}'
- Create a UI