Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -2,14 +2,10 @@ import gradio as gr
|
|
2 |
from joblib import load
|
3 |
import numpy as np
|
4 |
|
5 |
-
def
|
6 |
-
|
7 |
-
|
8 |
-
|
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 =
|
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 |
|