Metafazer/finrag-backend
0
1import sys2from finrag.retrieval.reranker import CrossEncoderReranker3query = "Summarize the key event or announcement described in this 8-K filing. What happened, what are the financial or operational implications, and what did management state about it?"4chunk = "Tesla reported Q1 earnings with a 50% increase in revenue. Management stated they are very happy. This 8-K exhibit outlines the financial results."5reranker = CrossEncoderReranker()6res = reranker.rerank(query, [{"text": chunk}])7print("RERANK RESULT:")8print(res)9 