File size: 428 Bytes
7d8eeca
8b14993
 
 
 
 
1ebd2ab
 
 
 
 
25a8db5
81b7588
6df7c61
a864526
2e3ad7f
ca3e561
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
from src.data.make_dataset import make_dataset
from .model import Summarization

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 = make_dataset(split="test")['input_text'][0]
    pre_summary = predict_model(text)
    print(pre_summary)