hernanhgm commited on
Commit
7ae4535
1 Parent(s): 5d8713e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -9
app.py CHANGED
@@ -2,14 +2,10 @@ import gradio as gr
2
  from joblib import load
3
  import numpy as np
4
 
5
- def scaler_model_selector():
6
- path = "E:\\duraton\\sexaje\\_dev\\Aguila real\\model_scaler"
7
- file_model = path + '\\classifier.joblib'
8
- file_scaler = path + '\\scaler.joblib'
9
- model = load(file_model)
10
- scaler = load(file_scaler)
11
-
12
- return model, scaler
13
 
14
  def calculate_means(L_izda, L_dcha):
15
  """
@@ -59,7 +55,7 @@ def classifier(data, model, scaler):
59
 
60
 
61
  def complete_classification(*measured_values):
62
- model, scaler = scaler_model_selector()
63
  data = process_inputs(measured_values)
64
  sexo = classifier(data, model, scaler)
65
 
 
2
  from joblib import load
3
  import numpy as np
4
 
5
+ def load_scaler_classifier():
6
+ classifier = load('classifier.joblib')
7
+ scaler = load('scaler.joblib')
8
+ return classifier, scaler
 
 
 
 
9
 
10
  def calculate_means(L_izda, L_dcha):
11
  """
 
55
 
56
 
57
  def complete_classification(*measured_values):
58
+ model, scaler = load_scaler_classifier()
59
  data = process_inputs(measured_values)
60
  sexo = classifier(data, model, scaler)
61