Skip to content

Commit

Permalink
document
Browse files Browse the repository at this point in the history
  • Loading branch information
jm1021 committed Mar 23, 2024
1 parent 1b8c7a1 commit 3cbf276
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions _notebooks/2024-03-05-DS-python-pandas-df_titanic.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,9 @@
"metadata": {},
"source": [
"### Building a Backend Model\n",
"The code above needs to be reformed into a Model. This Python Class is resturctured to follow Modlel, View (JavaScript), Control (Python API) paradigm."
"The code above needs to be reformed into a Model. This Python Class is resturctured to follow Modlel, View (JavaScript), Control (Python API) paradigm.\n",
"\n",
"Be sure to add to the model and \"Improve your chances\" interface."
]
},
{
Expand Down Expand Up @@ -506,7 +508,9 @@
"metadata": {},
"source": [
"### Building a Backend API\n",
"API code is then created to with the Model. This example is in imperitive style. Be sure to resturcture this code to work well with you Web application."
"API code is then created to with the Model. This example is in imperitive style. \n",
"\n",
"Be sure to resturcture this code to work well with you Web application."
]
},
{
Expand All @@ -519,7 +523,7 @@
"from flask import request, jsonify\n",
"\n",
"# Define the API endpoint for prediction\n",
"@app.route('/api/predict', methods=['POST'])\n",
"@app.route('/api/titanic/predict', methods=['POST'])\n",
"def predict():\n",
" # Get the passenger data from the request\n",
" passenger = request.get_json()\n",
Expand Down

0 comments on commit 3cbf276

Please sign in to comment.