Spaces:
Runtime error
Runtime error
Commit
·
2130c07
1
Parent(s):
38668de
Update app.py
Browse files
app.py
CHANGED
@@ -187,7 +187,7 @@ class BigramLanguageModel(nn.Module):
|
|
187 |
|
188 |
model = BigramLanguageModel()
|
189 |
the_model = model.to(device)
|
190 |
-
the_model.load_state_dict(torch.load('model.pth'))
|
191 |
the_model.eval()
|
192 |
|
193 |
def analyze_sentiment(text):
|
|
|
187 |
|
188 |
model = BigramLanguageModel()
|
189 |
the_model = model.to(device)
|
190 |
+
the_model.load_state_dict(torch.load('model.pth', map_location=torch.device('cpu')))
|
191 |
the_model.eval()
|
192 |
|
193 |
def analyze_sentiment(text):
|