Gladiator commited on
Commit
890cbac
1 Parent(s): e9ee3ed

remove cache

Browse files
Files changed (1) hide show
  1. app.py +3 -14
app.py CHANGED
@@ -11,15 +11,6 @@ from utils import (
11
  preprocess_text_for_abstractive_summarization,
12
  )
13
 
14
-
15
- @st.cache()
16
- def load_abs_summarizer(model_name, tokenizer_name):
17
- abs_summarizer = pipeline(
18
- "summarization", model=model_name, tokenizer=tokenizer_name
19
- )
20
- return abs_summarizer
21
-
22
-
23
  if __name__ == "__main__":
24
  # ---------------------------------
25
  # Main Application
@@ -75,12 +66,10 @@ if __name__ == "__main__":
75
  text="Creating abstractive summary. This might take a few seconds ..."
76
  ):
77
  text_to_summarize = clean_txt
78
- # abs_summarizer = pipeline(
79
- # "summarization", model=abs_model_name, tokenizer=abs_tokenizer_name
80
- # )
81
- abs_summarizer = load_abs_summarizer(
82
- model_name=abs_model_name, tokenizer_name=abs_tokenizer_name
83
  )
 
84
  if is_url is False:
85
  # list of chunks
86
  text_to_summarize = preprocess_text_for_abstractive_summarization(
 
11
  preprocess_text_for_abstractive_summarization,
12
  )
13
 
 
 
 
 
 
 
 
 
 
14
  if __name__ == "__main__":
15
  # ---------------------------------
16
  # Main Application
 
66
  text="Creating abstractive summary. This might take a few seconds ..."
67
  ):
68
  text_to_summarize = clean_txt
69
+ abs_summarizer = pipeline(
70
+ "summarization", model=abs_model_name, tokenizer=abs_tokenizer_name
 
 
 
71
  )
72
+
73
  if is_url is False:
74
  # list of chunks
75
  text_to_summarize = preprocess_text_for_abstractive_summarization(