MrGanesh commited on
Commit
f3fa90b
1 Parent(s): 13fcde7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -3,8 +3,8 @@ from transformers import pipeline
3
 
4
  @st.cache(allow_output_mutation=True)
5
  #def load_summarizer():
6
- model = pipeline("summarization", model="google/bigbird-pegasus-large-bigpatent")
7
- #return model
8
 
9
  #summarizer = load_summarizer()
10
  st.title("Patent Text Summarizer")
@@ -17,7 +17,7 @@ button = st.button("Summarize")
17
  with st.spinner("Generating Patent Summary.."):
18
  if button and sentence:
19
  #chunks = generate_chunks(sentence)
20
- res = model(sentence,
21
  max_length=500,
22
  min_length=100,
23
  truncation=True,
 
3
 
4
  @st.cache(allow_output_mutation=True)
5
  #def load_summarizer():
6
+ summarizer = pipeline("summarization", model="google/bigbird-pegasus-large-bigpatent")
7
+ #return model
8
 
9
  #summarizer = load_summarizer()
10
  st.title("Patent Text Summarizer")
 
17
  with st.spinner("Generating Patent Summary.."):
18
  if button and sentence:
19
  #chunks = generate_chunks(sentence)
20
+ res = summarizer(sentence,
21
  max_length=500,
22
  min_length=100,
23
  truncation=True,