madhurjindal
commited on
Commit
•
b923f28
1
Parent(s):
b54de11
Update app.py
Browse files
app.py
CHANGED
@@ -17,8 +17,8 @@ model = Net(
|
|
17 |
weight_decay=config.WEIGHT_DECAY,
|
18 |
)
|
19 |
|
20 |
-
model.load_state_dict(torch.load(config.MODEL_SAVE_PATH))
|
21 |
-
model.pred_store = torch.load(config.PRED_STORE_PATH)
|
22 |
|
23 |
|
24 |
def generate_gradio_output(
|
|
|
17 |
weight_decay=config.WEIGHT_DECAY,
|
18 |
)
|
19 |
|
20 |
+
model.load_state_dict(torch.load(config.MODEL_SAVE_PATH, map_location=torch.device('cpu')))
|
21 |
+
model.pred_store = torch.load(config.PRED_STORE_PATH, map_location=torch.device('cpu'))
|
22 |
|
23 |
|
24 |
def generate_gradio_output(
|