yanyichu commited on
Commit
d10b46d
1 Parent(s): 68d40a6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -148,8 +148,8 @@ def predict_raw(raw_input):
148
  _, dataloader = generate_dataset_dataloader(ids, seqs)
149
 
150
  model = CNN_linear()
151
- st.write(model.state_dict().keys())
152
- st.write({k.replace('module.', ''):v for k,v in torch.load(modelfile, map_location=torch.device('cpu')).items()}.keys())
153
  model.load_state_dict({k.replace('module.', ''):v for k,v in torch.load(modelfile, map_location=torch.device('cpu')).items()}, strict = True)
154
  # model.load_state_dict(torch.load(modelfile, map_location=torch.device('cpu')), strict = False)
155
 
 
148
  _, dataloader = generate_dataset_dataloader(ids, seqs)
149
 
150
  model = CNN_linear()
151
+ # st.write(model.state_dict().keys())
152
+ # st.write({k.replace('module.', ''):v for k,v in torch.load(modelfile, map_location=torch.device('cpu')).items()}.keys())
153
  model.load_state_dict({k.replace('module.', ''):v for k,v in torch.load(modelfile, map_location=torch.device('cpu')).items()}, strict = True)
154
  # model.load_state_dict(torch.load(modelfile, map_location=torch.device('cpu')), strict = False)
155