Spaces:
Runtime error
Runtime error
Update app.py (#6)
Browse files- Update app.py (1389140c8515c5a56ceb4fe0085a4f05f8dcc5d8)
Co-authored-by: Chen Liang <liangc40@users.noreply.huggingface.co>
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 =
|
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)
|