Spaces:
Runtime error
Runtime error
Pipeline updates
Browse files
src/models/evaluate_model.py
CHANGED
|
@@ -1,13 +1,13 @@
|
|
| 1 |
import dagshub
|
| 2 |
|
| 3 |
from src.models.model import Summarization
|
| 4 |
-
|
| 5 |
|
| 6 |
def evaluate_model():
|
| 7 |
"""
|
| 8 |
Evaluate model using rouge measure
|
| 9 |
"""
|
| 10 |
-
test_df =
|
| 11 |
model = Summarization()
|
| 12 |
model.load_model()
|
| 13 |
results = model.evaluate(test_df=test_df)
|
|
|
|
| 1 |
import dagshub
|
| 2 |
|
| 3 |
from src.models.model import Summarization
|
| 4 |
+
import pandas as pd
|
| 5 |
|
| 6 |
def evaluate_model():
|
| 7 |
"""
|
| 8 |
Evaluate model using rouge measure
|
| 9 |
"""
|
| 10 |
+
test_df = pd.load_csv('../../data/processed/test.csv')
|
| 11 |
model = Summarization()
|
| 12 |
model.load_model()
|
| 13 |
results = model.evaluate(test_df=test_df)
|
src/models/train_model.py
CHANGED
|
@@ -1,13 +1,13 @@
|
|
| 1 |
from src.models.model import Summarization
|
| 2 |
-
|
| 3 |
|
| 4 |
def train_model():
|
| 5 |
"""
|
| 6 |
Train the model
|
| 7 |
"""
|
| 8 |
# Load the data
|
| 9 |
-
train_df =
|
| 10 |
-
eval_df =
|
| 11 |
|
| 12 |
model = Summarization()
|
| 13 |
model.from_pretrained('t5-base')
|
|
|
|
| 1 |
from src.models.model import Summarization
|
| 2 |
+
import pandas as pd
|
| 3 |
|
| 4 |
def train_model():
|
| 5 |
"""
|
| 6 |
Train the model
|
| 7 |
"""
|
| 8 |
# Load the data
|
| 9 |
+
train_df = pd.load_csv('../../data/processed/train.csv')
|
| 10 |
+
eval_df = pd.load_csv('../../data/processed/validation.csv')
|
| 11 |
|
| 12 |
model = Summarization()
|
| 13 |
model.from_pretrained('t5-base')
|