File size: 672 Bytes
6d3173c
 
 
 
 
 
0725e2d
6d3173c
 
 
 
64a36e0
0725e2d
 
 
 
6d3173c
 
 
64a36e0
6d3173c
 
0725e2d
64a36e0
6d3173c
 
 
 
 
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
27
28
29
30
import streamlit
import pandas as pd
#import torch
from transformers import pipeline
import streamlit as st


def app():
    st.title("Text Summarization  🤓")

    st.markdown("This is a Web application that Summarizes Text 😎")
    text=st.text_area('Enter Text')
    
    summarizer = pipeline("summarization", model="google/bigbird-pegasus-large-bigpatent")
    
    pipe=summarizer(text,min_length=100, max_length=400)


    # Check to see if a file has been uploaded
    if text:
        st.success("Summarizing Text, Please wait...")
        # If it has then do the following:
        out=pipe(text)
        st.json(out)



if __name__ == "__main__":
    app()