qisan liangc40 commited on
Commit
89b3965
1 Parent(s): baf29f9

Update app.py (#6)

Browse files

- Update app.py (1389140c8515c5a56ceb4fe0085a4f05f8dcc5d8)


Co-authored-by: Chen Liang <liangc40@users.noreply.huggingface.co>

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)