Update app.py
Browse files
app.py
CHANGED
@@ -478,7 +478,7 @@ if summarize:
|
|
478 |
text_to_summarize = cleaned_text[0]
|
479 |
|
480 |
with st.spinner(
|
481 |
-
text="Loading
|
482 |
):
|
483 |
summarizer_model = google_model()
|
484 |
summarized_text = summarizer_model(text_to_summarize, max_length=max_len, min_length=min_len,clean_up_tokenization_spaces=True,no_repeat_ngram_size=4)
|
@@ -486,8 +486,8 @@ if summarize:
|
|
486 |
|
487 |
with st.spinner("Calculating and matching entities, this takes a few seconds..."):
|
488 |
|
489 |
-
entity_match_html = highlight_entities(' '.join(
|
490 |
-
st.subheader("Summarized text with matched entities in Green and mismatched entities in Red relative to the
|
491 |
st.markdown("####")
|
492 |
|
493 |
if article_title:
|
|
|
478 |
text_to_summarize = cleaned_text[0]
|
479 |
|
480 |
with st.spinner(
|
481 |
+
text="Loading Google-Pegasus Model and Extracting summary. This might take a few seconds depending on the length of your text..."
|
482 |
):
|
483 |
summarizer_model = google_model()
|
484 |
summarized_text = summarizer_model(text_to_summarize, max_length=max_len, min_length=min_len,clean_up_tokenization_spaces=True,no_repeat_ngram_size=4)
|
|
|
486 |
|
487 |
with st.spinner("Calculating and matching entities, this takes a few seconds..."):
|
488 |
|
489 |
+
entity_match_html = highlight_entities(' '.join(cleaned_text[0]),summarized_text)
|
490 |
+
st.subheader("Summarized text with matched entities in Green and mismatched entities in Red relative to the Original Text")
|
491 |
st.markdown("####")
|
492 |
|
493 |
if article_title:
|