Spaces:
Runtime error
Runtime error
cache bert models (extractive sum)
Browse files
app.py
CHANGED
@@ -21,10 +21,10 @@ def abstractive_summarizer(text : str, model):
|
|
21 |
|
22 |
return abs_summarized_text
|
23 |
|
24 |
-
@st.cache()
|
25 |
-
def load_ext_model():
|
26 |
-
|
27 |
-
|
28 |
|
29 |
@st.cache()
|
30 |
def load_abs_model():
|
@@ -52,7 +52,7 @@ if __name__ == "__main__":
|
|
52 |
if summarize_type == "Extractive":
|
53 |
# extractive summarizer
|
54 |
|
55 |
-
ext_model =
|
56 |
summarized_text = ext_model(inp_text, num_sentences=5)
|
57 |
|
58 |
elif summarize_type == "Abstractive":
|
|
|
21 |
|
22 |
return abs_summarized_text
|
23 |
|
24 |
+
# @st.cache()
|
25 |
+
# def load_ext_model():
|
26 |
+
# model = Summarizer()
|
27 |
+
# return model
|
28 |
|
29 |
@st.cache()
|
30 |
def load_abs_model():
|
|
|
52 |
if summarize_type == "Extractive":
|
53 |
# extractive summarizer
|
54 |
|
55 |
+
ext_model = Summarizer()
|
56 |
summarized_text = ext_model(inp_text, num_sentences=5)
|
57 |
|
58 |
elif summarize_type == "Abstractive":
|