-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathtest.py
93 lines (89 loc) · 2.1 KB
/
test.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
import requests
house = {
"Id": 1461,
"MSSubClass": 20,
"MSZoning": "RH",
"LotFrontage": 80.0,
"LotArea": 11622,
"Street": "Pave",
"Alley": " ",
"LotShape": "Reg",
"LandContour": "Lvl",
"Utilities": "AllPub",
"LotConfig": "Inside",
"LandSlope": "Gtl",
"Neighborhood": "NAmes",
"Condition1": "Feedr",
"Condition2": "Norm",
"BldgType": "1Fam",
"HouseStyle": "1Story",
"OverallQual": 5,
"OverallCond": 6,
"YearBuilt": 1961,
"YearRemodAdd": 1961,
"RoofStyle": "Gable",
"RoofMatl": "CompShg",
"Exterior1st": "VinylSd",
"Exterior2nd": "VinylSd",
"MasVnrType": "None",
"MasVnrArea": 0.0,
"ExterQual": "TA",
"ExterCond": "TA",
"Foundation": "CBlock",
"BsmtQual": "TA",
"BsmtCond": "TA",
"BsmtExposure": "No",
"BsmtFinType1": "Rec",
"BsmtFinSF1": 468,
"BsmtFinType2": "LwQ",
"BsmtFinSF2": 144,
"BsmtUnfSF": 270,
"TotalBsmtSF": 882,
"Heating": "GasA",
"HeatingQC": "TA",
"CentralAir": "Y",
"Electrical": "SBrkr",
"1stFlrSF": 896,
"2ndFlrSF": 0,
"LowQualFinSF": 0,
"GrLivArea": 896,
"BsmtFullBath": 0,
"BsmtHalfBath": 0,
"FullBath": 1,
"HalfBath": 0,
"BedroomAbvGr": 2,
"KitchenAbvGr": 1,
"KitchenQual": "TA",
"TotRmsAbvGrd": 5,
"Functional": "Typ",
"Fireplaces": 0,
"FireplaceQu": " ",
"GarageType": "Attchd",
"GarageYrBlt": 1961.0,
"GarageFinish": "Unf",
"GarageCars": 1,
"GarageArea": 730,
"GarageQual": "TA",
"GarageCond": "TA",
"PavedDrive": "Y",
"WoodDeckSF": 140,
"OpenPorchSF": 0,
"EnclosedPorch": 0,
"3SsnPorch": 0,
"ScreenPorch": 120,
"PoolArea": 0,
"PoolQC": " ",
"Fence": "MnPrv",
"MiscFeature": " ",
"MiscVal": 0,
"MoSold": 6,
"YrSold": 2010,
"SaleType": "WD",
"SaleCondition": "Normal",
}
if __name__ == "__main__":
host = "http://0.0.0.0:8000"
url = "https://5pyy36rjnj.execute-api.us-east-1.amazonaws.com/stg/predict"
response = requests.post(url, json=house)
result = response.json()
print(result)