Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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)
|