JasonTPhillipsJr commited on
Commit
3be15aa
1 Parent(s): d914cbe

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -23,7 +23,7 @@ bert_model.eval()
23
  #SpaBERT Initialization Section
24
  data_file_path = 'models/spabert/datasets/SPABERT_finetuning_data_combined.json'
25
  pretrained_model_path = 'models/spabert/datasets/fine-spabert-base-uncased-finetuned-osm-mn.pth'
26
- pre_trained_model = torch.load(pretrained_model_path, map_location=torch.device('cpu'))
27
 
28
  #b_model = BertForMaskedLM.from_pretrained('bert-base-uncased')
29
  #b_tokenizer = BertTokenizer.from_pretrained('bert-base-uncased')
@@ -32,6 +32,7 @@ config = SpatialBertConfig()
32
  config.output_hidden_states = True
33
  spaBERT_model = SpatialBertForMaskedLM(config)
34
 
 
35
  spaBERT_model.load_state_dict(bert_model.state_dict(), strict = False)
36
  spaBERT_model.load_state_dict(pre_trained_model, strict=False)
37
 
 
23
  #SpaBERT Initialization Section
24
  data_file_path = 'models/spabert/datasets/SPABERT_finetuning_data_combined.json'
25
  pretrained_model_path = 'models/spabert/datasets/fine-spabert-base-uncased-finetuned-osm-mn.pth'
26
+
27
 
28
  #b_model = BertForMaskedLM.from_pretrained('bert-base-uncased')
29
  #b_tokenizer = BertTokenizer.from_pretrained('bert-base-uncased')
 
32
  config.output_hidden_states = True
33
  spaBERT_model = SpatialBertForMaskedLM(config)
34
 
35
+ pre_trained_model = torch.load(pretrained_model_path, map_location=torch.device('cpu'))
36
  spaBERT_model.load_state_dict(bert_model.state_dict(), strict = False)
37
  spaBERT_model.load_state_dict(pre_trained_model, strict=False)
38