Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -65,7 +65,7 @@ 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 |
summarized_text = ' '.join([summ['summary_text'] for summ in summarized_text])
|
70 |
|
71 |
elif model_type == "T5":
|
@@ -90,7 +90,7 @@ def main():
|
|
90 |
with res_col1:
|
91 |
st.subheader("Generated Text Visualisation")
|
92 |
# Create and generate a word cloud image:
|
93 |
-
wordcloud = WordCloud().generate(summarized_text)
|
94 |
# Display the generated image:
|
95 |
plt.imshow(wordcloud, interpolation='bilinear')
|
96 |
plt.axis("off")
|
|
|
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":
|
|
|
90 |
with res_col1:
|
91 |
st.subheader("Generated Text Visualisation")
|
92 |
# Create and generate a word cloud image:
|
93 |
+
#wordcloud = WordCloud().generate(summarized_text)
|
94 |
# Display the generated image:
|
95 |
plt.imshow(wordcloud, interpolation='bilinear')
|
96 |
plt.axis("off")
|