Returns the estimated reading time of Radio-Canada news.
273
Returns the estimated reading time of Radio-Canada news.
docker build -t obamo .
echo 'NEURO_API_KEY="{YOUR_API_KEY}"' >> neuro_api.env
"Production" mode:
docker run -d \
-p 5000:5000 \
--name obamo \
--env-file neuro_api.env \
obamo
Development mode:
docker run -d \
-p 5000:5000 \
-e FLASK_DEBUG=1 \
--env-file neuro_api.env \
--name obamo \
-v $PWD:/usr/src/app \
obamo
/ping - validate the server is working:
curl http://localhost:5000/ping
pong
/readtime - get the estimated reading time for the given news story URL:
curl -X POST \
-H 'Content-Type: application/json' \
-d '{"url": "https://services.radio-canada.ca/hackathon2017/neuro/v1/news-stories/1023332"}'\
http://localhost:5000/readtime
{
"sections": {
"body": {
"minutes": 2,
"seconds": 90
},
"summary": {
"minutes": 1,
"seconds": 10
}
},
"total": {
"minutes": 2,
"seconds": 100
}
}
Content type
Image
Digest
Size
265.6 MB
Last updated
over 9 years ago
docker pull samueldg/obamo