This is a Potassium HTTP server for our GTPJ model finetuned for news title and teaser generation.
Note: This model requires a GPU with ~ 12GB memory for generation!
Curious to get your hand on GPTJ-Title-Teaser-10k?
You can check it out with docker:
- Run
docker build -t gptj-title-teaser-10k . && docker run -it gptj-title-teaser-10k
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": "[Text]: <Insert-the-fulltext-of-a-news-article-here> \n\n[Titel]:"}' \
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!