This is a Potassium HTTP server for our SNIP-IGEL model finetuned for news snippet generation.
Note: This model requires a GPU with ~ 12GB memory for generation!
Curious to get your hand on SNIP-IGEL?
You can check it out with docker:
- Run
docker build -t snip-igel-500-v2 . && docker run -it snip-igel-500-v2
to build and run the docker container.
Or you can check it out manually:
- Run
pip3 install -r requirements.txt
to download dependencies. - Run
python3 app.py
to start the server. - You should see:
------
Starting server 🍌
Running init()
...
Serving on http://localhost:8000
------
- Now open up a different terminal and hit the server with a simple cURL POST request
curl -X POST \
-H "Content-Type: application/json" \
-d '{prompt": "Generate a title for the following news article.", "document": "<Insert-the-fulltext-of-a-news-article-here>"}' \
http://localhost:8000/
- Boom! 🎉 You just ran an inference on the model on your local machine!
{
"output": "Here is the text the model generated."
}
Note: For this you need the banana-cli installed. Run
pip3 install banana-cli
to install it.
- Fork this repo and clone it to your local device.
- Start a local dev server with
banana dev
.
- Log into Banana.
- Select your fork of the repo to build and deploy!