JasonTPhillipsJr commited on
Commit
52ad8f8
·
verified ·
1 Parent(s): 78d5be0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -74,7 +74,6 @@ def process_entity(batch, model, device):
74
 
75
  # Convert tensor to list of token IDs, and decode them into a readable sentence
76
  pseudo_sentence_decoded = bert_tokenizer.decode(pseudo_sentence[0].tolist(), skip_special_tokens=False)
77
- st.write("Pseudo Sentence: ", pseudo_sentence_decoded)
78
 
79
  with torch.no_grad():
80
  outputs = spaBERT_model(#input_ids=input_ids,
@@ -124,6 +123,7 @@ def get_spaBert_embedding(entity):
124
  st.write("Got Bert embedding for: ", entity)
125
  return get_bert_embedding(entity) #Fallback in-case SpaBERT could not resolve entity to retrieve embedding. Rare-cases only.
126
  else:
 
127
  if(dev_mode == True):
128
  st.write("Got SpaBert embedding for: ", entity)
129
  return spaBERT_embeddings[entity_index]
 
74
 
75
  # Convert tensor to list of token IDs, and decode them into a readable sentence
76
  pseudo_sentence_decoded = bert_tokenizer.decode(pseudo_sentence[0].tolist(), skip_special_tokens=False)
 
77
 
78
  with torch.no_grad():
79
  outputs = spaBERT_model(#input_ids=input_ids,
 
123
  st.write("Got Bert embedding for: ", entity)
124
  return get_bert_embedding(entity) #Fallback in-case SpaBERT could not resolve entity to retrieve embedding. Rare-cases only.
125
  else:
126
+ st.write("Pseudo Sentnece:",pseudo_sentences[entity_index])
127
  if(dev_mode == True):
128
  st.write("Got SpaBert embedding for: ", entity)
129
  return spaBERT_embeddings[entity_index]