liangc40 commited on
Commit
1389140
1 Parent(s): baf29f9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -15,7 +15,7 @@ project = hopsworks.login(project='liangc40')
15
  mr = project.get_model_registry()
16
  model = mr.get_model("sentimental_analysis_model", version=1)
17
  model_dir = model.download()
18
- model = joblib.load(model_dir + "/sentimental_analysis_model.pkl")
19
 
20
  def analyse(text):
21
  label = model(text)
 
15
  mr = project.get_model_registry()
16
  model = mr.get_model("sentimental_analysis_model", version=1)
17
  model_dir = model.download()
18
+ model = torch.load(model_dir + "/sentimental_analysis_model.pkl", map_location=torch.device('cpu'))
19
 
20
  def analyse(text):
21
  label = model(text)