File size: 661 Bytes
2833618
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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()