HenryStephen
commited on
Commit
•
df845d1
1
Parent(s):
3e68e5b
Modify device parameter
Browse files
app.py
CHANGED
@@ -114,7 +114,7 @@ def load_kmeans_model():
|
|
114 |
@st.cache_resource(show_spinner="Loading SimilarityCal model...")
|
115 |
def load_similaritycal_model():
|
116 |
sim_cal_model = PairClassifier()
|
117 |
-
sim_cal_model.load_state_dict(torch.load(SIMILARITY_CAL_MODEL_PATH))
|
118 |
sim_cal_model = sim_cal_model.to(device)
|
119 |
sim_cal_model = sim_cal_model.eval()
|
120 |
return sim_cal_model
|
|
|
114 |
@st.cache_resource(show_spinner="Loading SimilarityCal model...")
|
115 |
def load_similaritycal_model():
|
116 |
sim_cal_model = PairClassifier()
|
117 |
+
sim_cal_model.load_state_dict(torch.load(SIMILARITY_CAL_MODEL_PATH, map_location=device))
|
118 |
sim_cal_model = sim_cal_model.to(device)
|
119 |
sim_cal_model = sim_cal_model.eval()
|
120 |
return sim_cal_model
|