Spaces:
Runtime error
Runtime error
File size: 546 Bytes
10a5b65 3f8d76d 10a5b65 96c4203 410b92f 96c4203 3f8d76d 96c4203 904cf68 96c4203 3f8d76d 96c4203 3f8d76d 10a5b65 96c4203 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
import dagshub
import yaml
from src.models.model import Summarization
import pandas as pd
def evaluate_model():
"""
Evaluate model using rouge measure
"""
with open("params.yml") as f:
params = yaml.safe_load(f)
test_df = pd.load_csv('data/processed/test.csv')
model = Summarization()
model.load_model(model_dir=params['model_dir'])
results = model.evaluate(test_df=test_df, metrics=params['metric'])
with dagshub.dagshub_logger() as logger:
logger.log_metrics(results)
return results
|