# ---
# jupyter:
#   jupytext:
#     text_representation:
#       extension: .py
#       format_name: light
#       format_version: '1.5'
#       jupytext_version: 1.14.4
#   kernelspec:
#     display_name: Python 3
#     language: python
#     name: python3
# ---

# # /api Test

import json
import requests

# Set URL
url = "http://127.0.0.1:5000/api"

# Data for Class: 2
data = json.dumps({'SepalLengthCm': 5.9,
                   'SepalWidthCm': 3.5,
                   'PetalLengthCm': 5.1,
                   'PetalWidthCm': 1.8})

# Get Prediction
send = requests.post(url, data)
print(send.json())

# # /class_api Test

# Set URL
url = "http://127.0.0.1:5000/class_api"

# Data for Class: 'Iris-setosa'
data = json.dumps({'SepalLengthCm': 5.1,
                   'SepalWidthCm': 3.5,
                   'PetalLengthCm': 1.4,
                   'PetalWidthCm': 0.2})

# Get Prediction
send = requests.post(url, data)
print(send.json())

# # /medicare_cost Test

# Set URL
url = "http://127.0.0.1:5000/medicare_costs"

# Data for $1188
data = json.dumps({'diagnosis': 'Circulatory',
                   'state': 'AL'})

send = requests.post(url, data)
print(send.json())

StarcoderdataJupyterScriptsDedupFiltered