hernanhgm commited on
Commit
8aa84d4
·
1 Parent(s): e497421

Use pickle to load

Browse files
Files changed (1) hide show
  1. app.py +3 -3
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 sklearn
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)