Spaces:
Runtime error
Runtime error
Use pickle to load
Browse files
app.py
CHANGED
@@ -2,7 +2,7 @@ import numpy as np
|
|
2 |
from transformers import AutoModel
|
3 |
import gradio as gr
|
4 |
from torch import load
|
5 |
-
import
|
6 |
|
7 |
|
8 |
|
@@ -14,8 +14,8 @@ def promediado(L_izda, DV_izda, L_dcha, DV_dcha):
|
|
14 |
|
15 |
def clasificador(L, DV):
|
16 |
|
17 |
-
model = load("model.pkl")
|
18 |
-
scaler = load("scaler.pkl")
|
19 |
|
20 |
data = np.array([L, DV]).reshape(1, -1)
|
21 |
data_scaled = scaler.transform(data)
|
|
|
2 |
from transformers import AutoModel
|
3 |
import gradio as gr
|
4 |
from torch import load
|
5 |
+
import pickle
|
6 |
|
7 |
|
8 |
|
|
|
14 |
|
15 |
def clasificador(L, DV):
|
16 |
|
17 |
+
model = pickle.load("model.pkl")
|
18 |
+
scaler = pickle.load("scaler.pkl")
|
19 |
|
20 |
data = np.array([L, DV]).reshape(1, -1)
|
21 |
data_scaled = scaler.transform(data)
|