Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -8,7 +8,7 @@ import torch
|
|
8 |
@st.cache()
|
9 |
def get_model():
|
10 |
model = AutoModelForSequenceClassification.from_pretrained("siebert/sentiment-roberta-large-english", num_labels=2)
|
11 |
-
model.load_state_dict(torch.load('cached_model.pth'))
|
12 |
return model
|
13 |
|
14 |
@st.cache()
|
|
|
8 |
@st.cache()
|
9 |
def get_model():
|
10 |
model = AutoModelForSequenceClassification.from_pretrained("siebert/sentiment-roberta-large-english", num_labels=2)
|
11 |
+
model.load_state_dict(torch.load('cached_model.pth', map_location=torch.device('cpu')))
|
12 |
return model
|
13 |
|
14 |
@st.cache()
|