test.sh 1021 B

12345678910111213
  1. #!/bin/bash -ex
  2. set -e
  3. # Image Classification
  4. # curl -X POST "http://api.your-server.net:8883/predict" -d "{\"service\":\"imageserv\",\"parameters\":{\"input\":{\"width\":224,\"height\":224},\"output\":{\"best\":3},\"mllib\":{\"gpu\":false}},\"data\":[\"http://i.ytimg.com/vi/0vxOhd4qlnA/maxresdefault.jpg\"]}"
  5. # Text Analysis
  6. curl http://api.your-server.net:5000/api --header 'content-type: application/json' --data '{"text": "This is a text that I want to be analyzed. My name is Peter Alcock and I live in Boston, MA."}' -X POST
  7. # curl http://api.your-server.net:8880/add --header 'content-type: application/x-www-form-urlencoded' --data '{"filepath":"britney.jpg" , "url": "http://i.ytimg.com/vi/0vxOhd4qlnA/maxresdefault.jpg"}' -X POST
  8. curl -d "text=I%20am%20happy" http://api.your-server.net:8880
  9. curl -X POST -H "Content-Type: application/json" -d '{"img_url":"http://bit.ly/ocrimage","engine":"tesseract"}' http://api.your-server.net:9292/ocr
  10. curl http://api.your-server.net:8882/locate?ip=172.56.38.214
  11. exit 0