JasonTPhillipsJr commited on
Commit
b14ffe5
1 Parent(s): cb96047

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -136,8 +136,9 @@ def processSpatialEntities(review, nlp):
136
  spaBert_emb = get_spaBert_embedding(text)
137
  token_embeddings.append(spaBert_emb)
138
  st.write("Geo-Entity Found in review: ", text)
139
-
140
- processed_embedding = torch.cat(token_embeddings, dim=0)
 
141
  st.write("processed embedding shape: ", processed_embedding.shape)
142
  return processed_embedding
143
 
 
136
  spaBert_emb = get_spaBert_embedding(text)
137
  token_embeddings.append(spaBert_emb)
138
  st.write("Geo-Entity Found in review: ", text)
139
+
140
+ token_embeddings = torch.stack(token_embeddings, dim=0)
141
+ processed_embedding = token_embeddings.mean(dim=0, keepdim=True)
142
  st.write("processed embedding shape: ", processed_embedding.shape)
143
  return processed_embedding
144