Spaces:
Sleeping
Sleeping
Fix GNN model loading to specify CPU mapping for compatibility
Browse files- src/demo.py +1 -1
src/demo.py
CHANGED
|
@@ -40,7 +40,7 @@ if "setup_complete" not in st.session_state:
|
|
| 40 |
dropout_rate=0.5,
|
| 41 |
)
|
| 42 |
undirected_gnn_model.load_state_dict(
|
| 43 |
-
torch.load(config.GNN_MODEL_PATH)
|
| 44 |
)
|
| 45 |
st.session_state.undirected_gnn_model = undirected_gnn_model
|
| 46 |
st.session_state.undirected_graph_data = undirected_graph_data
|
|
|
|
| 40 |
dropout_rate=0.5,
|
| 41 |
)
|
| 42 |
undirected_gnn_model.load_state_dict(
|
| 43 |
+
torch.load(config.GNN_MODEL_PATH, map_location=torch.device("cpu"))
|
| 44 |
)
|
| 45 |
st.session_state.undirected_gnn_model = undirected_gnn_model
|
| 46 |
st.session_state.undirected_graph_data = undirected_graph_data
|