sebastiansarasti commited on
Commit
2c4ddaa
·
verified ·
1 Parent(s): 4e8b885

solving the device

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -15,7 +15,7 @@ def get_model_list():
15
 
16
  def load_model(path):
17
  model = JobFakeModel(base_model="distilbert", freeze_base=True)
18
- model.load_state_dict(torch.load(path, device="cpu"))
19
  return model
20
 
21
  st.title('Fake Jobs Streamlit App')
 
15
 
16
  def load_model(path):
17
  model = JobFakeModel(base_model="distilbert", freeze_base=True)
18
+ model.load_state_dict(torch.load(path, map_location=torch.device('cpu')))
19
  return model
20
 
21
  st.title('Fake Jobs Streamlit App')