def get_finetuned_model(
        self, model_name: str, top_n: int = 3
    ) -> SentenceTransformerRerank:
        """
        Loads the model from huggingface hub as re-ranker.

        :param repo_id: Huggingface Hub repo from where you want to load the model
        :param top_n: The value of nodes the re-ranker should filter
        """
        return SentenceTransformerRerank(model=model_name, top_n=top_n)

        Loads the model from huggingface hub as re-ranker.

        :param repo_id: Huggingface Hub repo from where you want to load the model
        :param top_n: The value of nodes the re-ranker should filter
        
llama-index-finetuning/llama_index/finetuning/cross_encoders/cross_encoder.py