import evaluate | |
rouge_score = evaluate.load("rouge") | |
def get_rouge_scores(genererated_summary:str,reference_summary:str)->dict: | |
rouge_result = rouge_score.compute(predictions=[genererated_summary], references=[reference_summary]) | |
return rouge_result |