hernanhgm commited on
Commit
3030249
·
1 Parent(s): 0d360e0

back to joblib for model loading

Browse files
Files changed (1) hide show
  1. app.py +6 -5
app.py CHANGED
@@ -1,8 +1,9 @@
1
  import numpy as np
2
- from transformers import AutoModel
3
  import gradio as gr
4
- from torch import load
5
- import pickle
 
6
 
7
 
8
 
@@ -14,8 +15,8 @@ def promediado(L_izda, DV_izda, L_dcha, DV_dcha):
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)
 
1
  import numpy as np
2
+ #from transformers import AutoModel
3
  import gradio as gr
4
+ import joblib
5
+ #from torch import load
6
+ #import pickle
7
 
8
 
9
 
 
15
 
16
  def clasificador(L, DV):
17
 
18
+ model = joblib.load("model.pkl")
19
+ scaler = joblib.load("scaler.pkl")
20
 
21
  data = np.array([L, DV]).reshape(1, -1)
22
  data_scaled = scaler.transform(data)