Are you sure you want to delete this access key?
Legend |
---|
DVC Managed File |
Git Managed File |
Metric |
Stage File |
External File |
Legend |
---|
DVC Managed File |
Git Managed File |
Metric |
Stage File |
External File |
The data is downloaded from Kaggle.
src
: consists of Python scriptsconfig
: consists of configuration filesnotebook
: consists of Jupyter Notebookstests
: consists of test filesmake setup
export PREFECT__FLOWS__CHECKPOINTING=true
To run all flows, type:
python src/main.py
To run the process
flow, type:
python src/main.py flow=process
To run the segment
flow, type:
python src/main.py flow=segment
To serve the trained model, run:
bentoml serve src/bentoml_app.py:service --reload
To send requests to the newly started service in Python, run:
python src/predict.py
Details of predict.py
:
import requests
prediction = requests.post(
"http://127.0.0.1:5000/predict",
headers={"content-type": "application/json"},
data='{"Income": 58138, "Recency": 58, "Complain": 0,"age": 64,"total_purchases": 25,"enrollment_years": 10,"family_size": 1}',
).text
print(prediction)
Output:
1
Press p or to see the previous file or, n or to see the next file
Are you sure you want to delete this access key?
Are you sure you want to delete this access key?
Are you sure you want to delete this access key?
Are you sure you want to delete this access key?