MrGanesh's picture
Update app.py
a3c9d6d
raw
history blame
607 Bytes
import streamlit as st
import pandas as pd
#import torch
from transformers import pipeline
summarizer = pipeline("summarization", model="google/bigbird-pegasus-large-bigpatent"
st.title("Text Summarization πŸ€“")
st.markdown("This is a Web application that Summarizes Text 😎")
text=st.text_area('Enter Text')
summarize = st.button("Summarize")
# Check to see if a file has been uploaded
if summarize:
st.success("Summarizing Text, Please wait...")
# If it has then do the following:
result=summarizer(text,min_length=100, max_length=400)
st.header(result)