I want to compute cosine similarity between every pair of sentences as bert embeddings and add average score of each sentences in new column as rank. I wrote following code