Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update /prediction python route to match odh documentation resource #14

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions 0_start_here.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@
"metadata": {},
"outputs": [],
"source": [
"!curl -X POST -H \"Content-Type: application/json\" --data '{\"data\": \"hello world\"}' http://localhost:5000/predictions\n"
"!curl -X POST -H \"Content-Type: application/json\" --data '{\"data\": \"hello world\"}' http://localhost:5000/prediction\n"
]
},
{
Expand All @@ -156,7 +156,7 @@
"source": [
"import requests\n",
"import json\n",
"response = requests.post('http://127.0.0.1:5000/predictions', '{\"hello\":\"world\"}')\n",
"response = requests.post('http://127.0.0.1:5000/prediction', '{\"hello\":\"world\"}')\n",
"response.json()"
]
},
Expand Down
4 changes: 2 additions & 2 deletions 2_test_flask.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"metadata": {},
"outputs": [],
"source": [
"!curl -X POST -H \"Content-Type: application/json\" --data '{\"data\": \"hello world\"}' http://localhost:5000/predictions"
"!curl -X POST -H \"Content-Type: application/json\" --data '{\"data\": \"hello world\"}' http://localhost:5000/prediction"
]
},
{
Expand All @@ -39,7 +39,7 @@
"source": [
"import requests\n",
"import json\n",
"response = requests.post('http://127.0.0.1:5000/predictions', '{\"hello\":\"world\"}')\n",
"response = requests.post('http://127.0.0.1:5000/prediction', '{\"hello\":\"world\"}')\n",
"response.json()"
]
},
Expand Down
2 changes: 1 addition & 1 deletion wsgi.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ def status():
return jsonify({'status': 'ok'})


@application.route('/predictions', methods=['POST'])
@application.route('/prediction', methods=['POST'])
def create_prediction():
data = request.data or '{}'
body = json.loads(data)
Expand Down