Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -65,8 +65,8 @@ def main():
|
|
65 |
with st.spinner(
|
66 |
text="Loading Bart Model and Extracting summary. This might take a few seconds depending on the length of your text..."):
|
67 |
summarizer_model = bart()
|
68 |
-
|
69 |
-
|
70 |
|
71 |
elif model_type == "T5":
|
72 |
text_to_summarize = clean_text
|
@@ -74,8 +74,8 @@ def main():
|
|
74 |
with st.spinner(
|
75 |
text="Loading T5 Model and Extracting summary. This might take a few seconds depending on the length of your text..."):
|
76 |
summarizer_model = t5()
|
77 |
-
|
78 |
-
|
79 |
|
80 |
elif model_type == "ssr":
|
81 |
text_to_summarize = clean_text
|
@@ -83,8 +83,8 @@ def main():
|
|
83 |
with st.spinner(
|
84 |
text="Loading SSR Model and Extracting summary. This might take a few seconds depending on the length of your text..."):
|
85 |
summarizer_model = ssr()
|
86 |
-
|
87 |
-
|
88 |
|
89 |
res_col1 ,res_col2 = st.columns(2)
|
90 |
with res_col1:
|
|
|
65 |
with st.spinner(
|
66 |
text="Loading Bart Model and Extracting summary. This might take a few seconds depending on the length of your text..."):
|
67 |
summarizer_model = bart()
|
68 |
+
summarized_text = summarizer_model(text_to_summarize, max_length=max_length ,min_length=min_length)
|
69 |
+
summarized_text = ' '.join([summ['summary_text'] for summ in summarized_text])
|
70 |
|
71 |
elif model_type == "T5":
|
72 |
text_to_summarize = clean_text
|
|
|
74 |
with st.spinner(
|
75 |
text="Loading T5 Model and Extracting summary. This might take a few seconds depending on the length of your text..."):
|
76 |
summarizer_model = t5()
|
77 |
+
summarized_text = summarizer_model(text_to_summarize, max_length=max_length, min_length=min_length)
|
78 |
+
summarized_text = ' '.join([summ['summary_text'] for summ in summarized_text])
|
79 |
|
80 |
elif model_type == "ssr":
|
81 |
text_to_summarize = clean_text
|
|
|
83 |
with st.spinner(
|
84 |
text="Loading SSR Model and Extracting summary. This might take a few seconds depending on the length of your text..."):
|
85 |
summarizer_model = ssr()
|
86 |
+
summarized_text = summarizer_model(text_to_summarize, max_length=max_length, min_length=min_length)
|
87 |
+
summarized_text = ' '.join([summ['summary_text'] for summ in summarized_text])
|
88 |
|
89 |
res_col1 ,res_col2 = st.columns(2)
|
90 |
with res_col1:
|