JasonTPhillipsJr commited on
Commit
1091141
1 Parent(s): f82dac8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -5
app.py CHANGED
@@ -24,10 +24,6 @@ bert_model.eval()
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')
30
-
31
  config = SpatialBertConfig()
32
  config.output_hidden_states = True
33
  spaBERT_model = SpatialBertForMaskedLM(config)
@@ -41,7 +37,7 @@ spaBERT_model.eval()
41
 
42
 
43
  #Get BERT Embedding for review
44
- def get_bert_embedding(review_text)
45
  #tokenize review
46
  inputs = bert_tokenizer(review_text, return_tensors='pt', padding=True, truncation=True).to(device)
47
 
 
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
  config = SpatialBertConfig()
28
  config.output_hidden_states = True
29
  spaBERT_model = SpatialBertForMaskedLM(config)
 
37
 
38
 
39
  #Get BERT Embedding for review
40
+ def get_bert_embedding(review_text):
41
  #tokenize review
42
  inputs = bert_tokenizer(review_text, return_tensors='pt', padding=True, truncation=True).to(device)
43