File size: 482 Bytes
2c781f8
 
 
 
 
 
 
 
 
29cce3f
2c781f8
 
 
29cce3f
2c781f8
 
 
 
 
 
 
 
29cce3f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
import requests

with open("iris.csv", "rb") as csv:
    iris_data = csv.read()

ARGS = {
    "epochs": 100,
    "hidden_size": 12,
    "learning_rate": 0.01,
    "test_size": 0.3,
    "activation": "tanh",
    "features": ["sepal width", "sepal length", "petal width", "petal length"],
    "target": "species",
    "data": iris_data.decode("utf-8"),
}

r = requests.post(
    "http://127.0.0.1:5000/neural-network",
    json=ARGS,
)

if __name__ == "__main__":
    print(r.json())