Update app.py
Browse files
app.py
CHANGED
@@ -219,7 +219,7 @@ class ReformerEncoderDecoder(PreTrainedModel):
|
|
219 |
|
220 |
# model load
|
221 |
model = ReformerEncoderDecoder(ReformerEncoderDecoderConfig()).to(device)
|
222 |
-
model.load_state_dict(torch.load("model.pth"
|
223 |
tokenizer = REMI(params="tokenizer.json")
|
224 |
# model load end
|
225 |
|
|
|
219 |
|
220 |
# model load
|
221 |
model = ReformerEncoderDecoder(ReformerEncoderDecoderConfig()).to(device)
|
222 |
+
model.load_state_dict(torch.load("model.pth", map_location=torch.device(device)))
|
223 |
tokenizer = REMI(params="tokenizer.json")
|
224 |
# model load end
|
225 |
|