File size: 408 Bytes
9bbcc22
3f8d76d
9bbcc22
d1aa7b9
c015c4c
 
 
 
 
 
 
 
0ee5810
d1aa7b9
0ee5810
3f8d76d
0ee5810
d1aa7b9
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
from .model import Summarization
import pandas as pd


def predict_model(text):
    """
    Predict the summary of the given text.
    """
    model = Summarization()
    model.load_model()
    pre_summary = model.predict(text)
    return pre_summary


if __name__ == '__main__':
    text = pd.load_csv('data/processed/test.csv')['input_text'][0]
    pre_summary = predict_model(text)
    print(pre_summary)