MrGanesh's picture
Create new file
2833618
raw
history blame
661 Bytes
import streamlit as st
import pandas as pd
#import torch
from transformers import pipeline
summarizer = pipeline("summarization", model="google/bigbird-pegasus-large-bigpatent"
def summary():
# st.title("DOCUMENT SUMMARIZER")
html_temp = """
<div style ="background-color:cyan;padding:13px">
<h1 style ="color:black;text-align:center;">PATENT SUMMARIZER</h1>
</div>
"""
st.markdown(html_temp, unsafe_allow_html = True)
my_file=st.text_area("Paste Document content", placeholder="Paste here",height=60)
result =""
if st.button("Summarize"):
result = summarizer(my_file)
st.success(result)
summary()