File size: 648 Bytes
7a96f34
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
import streamlit as st

#from src.summary import summarize
#from src.bert2 import get_summary
#from src.mbart import predictions
from src.bert3 import predictions


if __name__ == '__main__':

    st.header("Text Summarization using BERT")
    st.subheader("This app will summarize the long piece of input text in a few sentences")

    st.subheader("Paste your long text below:")
    text = st.text_area(label="Input text")
    if st.button("Summarize"):
        if text:
            summary_result = predictions(text)
            st.success(summary_result)
            

        else:
            st.error("Please paste or write(!) some text")