-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathtest_app.py
More file actions
59 lines (57 loc) · 1.11 KB
/
test_app.py
File metadata and controls
59 lines (57 loc) · 1.11 KB
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
import requests as r
# add transactions
review ={
"step":50,
"type":"PAYMENT",
"amount":9839.64,
"nameOrig":"C1231006815",
"oldbalanceOrig":170136.0,
"newbalanceOrig":160296.36,
"nameDest":"M1979787155",
"oldbalanceDest":0.0,
"newbalanceDest":0.0
}
test2={"step":234,
"type":"CASH_OUT",
"amount":305822.52,
"nameOrig":"C1376293938",
"oldbalanceOrig":0.0,
"newbalanceOrig":0.0,
"nameDest":"C182325611",
"oldbalanceDest":1569390.8999999999,
"newbalanceDest":1875213.4199999999}
test3={
"step": [
0,234
],
"type": [
"string","CASH_OUT"
],
"amount": [
0,305822.52
],
"nameOrig": [
"string","C1376293938"
],
"oldbalanceOrig": [
0,0.0
],
"newbalanceOrig": [
0,0.0
],
"nameDest": [
"string","C182325611"
],
"oldbalanceDest": [
0,1569390.8999999999
],
"newbalanceDest": [
0,1875213.4199999999
]
}
keys = {"request": test1}
keys2 = {"item": test2}
#prediction = r.get("http://127.0.0.1:4000/'chaka'")
prediction = r.post("http://127.0.0.1:4000/predict-fraud", json=test3)
results=prediction.json()
print(results )