Spaces:
Sleeping
Sleeping
Fix GNN model loading to specify CPU mapping for compatibility
Browse files- src/demo.py +1 -1
src/demo.py
CHANGED
|
@@ -59,7 +59,7 @@ if "setup_complete" not in st.session_state:
|
|
| 59 |
dropout_rate=0.5,
|
| 60 |
)
|
| 61 |
no_edge_gnn_model.load_state_dict(
|
| 62 |
-
torch.load(config.GNN_MODEL_PATH.replace("undirected_gnn", "no_edge_gnn"))
|
| 63 |
)
|
| 64 |
st.session_state.no_edge_gnn_model = no_edge_gnn_model
|
| 65 |
st.session_state.no_edge_graph_data = no_edge_graph_data
|
|
|
|
| 59 |
dropout_rate=0.5,
|
| 60 |
)
|
| 61 |
no_edge_gnn_model.load_state_dict(
|
| 62 |
+
torch.load(config.GNN_MODEL_PATH.replace("undirected_gnn", "no_edge_gnn"), map_location=torch.device("cpu"))
|
| 63 |
)
|
| 64 |
st.session_state.no_edge_gnn_model = no_edge_gnn_model
|
| 65 |
st.session_state.no_edge_graph_data = no_edge_graph_data
|