bhagyabonam commited on
Commit
4813d6d
·
verified ·
1 Parent(s): 829a348

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -0
app.py CHANGED
@@ -228,6 +228,8 @@ print(f"Shape of objection_embeddings: {objection_embeddings.shape}")
228
 
229
  # Assuming you know the expected dimension of the embeddings (e.g., 768)
230
  expected_dim = 768 # Example value for sentence embeddings (replace with the actual dimension)
 
 
231
 
232
  # Check if the embeddings dimensionality matches the expected dimension
233
  if objection_embeddings.shape[1] != expected_dim:
 
228
 
229
  # Assuming you know the expected dimension of the embeddings (e.g., 768)
230
  expected_dim = 768 # Example value for sentence embeddings (replace with the actual dimension)
231
+ if len(objection_embeddings.shape) == 1:
232
+ objection_embeddings = objection_embeddings.reshape(-1, 1)
233
 
234
  # Check if the embeddings dimensionality matches the expected dimension
235
  if objection_embeddings.shape[1] != expected_dim: