Jensen-holm commited on
Commit
0411a47
·
1 Parent(s): f04bbb4

updating example request in readme

Browse files
Files changed (1) hide show
  1. README.md +9 -6
README.md CHANGED
@@ -13,18 +13,21 @@ request_params = {
13
  "arguments": {
14
  "epochs": 100,
15
  "activation_func": "relu",
16
- "hidden_size": "8",
17
  "learning_rate": 0.1,
18
  }
19
  }
20
 
 
 
 
 
21
  r = requests.post(
22
  "https://data-mining-from-scratch-backend.onrender.com/",
23
- json=request_params,
 
24
  )
25
 
26
- response_data = json.loads(r.json)
27
- print(response_data)
28
-
29
  ```
30
-
 
13
  "arguments": {
14
  "epochs": 100,
15
  "activation_func": "relu",
16
+ "hidden_size": 8,
17
  "learning_rate": 0.1,
18
  }
19
  }
20
 
21
+ headers = {
22
+ "Content-Type": "application/json",
23
+ }
24
+
25
  r = requests.post(
26
  "https://data-mining-from-scratch-backend.onrender.com/",
27
+ headers=headers,
28
+ data=json.dumps(request_params),
29
  )
30
 
31
+ model_data = r.json()
32
+ print(model_data)
 
33
  ```