Jegree commited on
Commit
8a51781
·
verified ·
1 Parent(s): a79eb48

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +0 -10
app.py CHANGED
@@ -9,21 +9,11 @@ from sklearn.ensemble import RandomForestClassifier
9
  scalerSession = rt.InferenceSession("standard_scaler.onnx")
10
  modelSession = rt.InferenceSession("random_forest_model.onnx")
11
 
12
- with open("random_forest_model.json", "r") as f:
13
- params = json.load(f)
14
- model = RandomForestClassifier(**params)
15
- del(params)
16
-
17
  def softmax(x):
18
  """Compute softmax values for each sets of scores in x."""
19
  e_x = np.exp(x - np.max(x))
20
  return e_x / e_x.sum()
21
 
22
- with open("scaler.json", "r") as f:
23
- params = json.load(f)
24
- scaler = StandardScaler(**params)
25
- del(params)
26
-
27
  def calculate_bmi(weight, height):
28
  # Calculate BMI
29
  bmi = weight / (height ** 2)
 
9
  scalerSession = rt.InferenceSession("standard_scaler.onnx")
10
  modelSession = rt.InferenceSession("random_forest_model.onnx")
11
 
 
 
 
 
 
12
  def softmax(x):
13
  """Compute softmax values for each sets of scores in x."""
14
  e_x = np.exp(x - np.max(x))
15
  return e_x / e_x.sum()
16
 
 
 
 
 
 
17
  def calculate_bmi(weight, height):
18
  # Calculate BMI
19
  bmi = weight / (height ** 2)