Spaces:
Runtime error
Runtime error
Commit
·
42540ef
1
Parent(s):
47837be
working on text splitting
Browse files
app.py
CHANGED
|
@@ -31,7 +31,7 @@ def main() -> None:
|
|
| 31 |
def display_summary(summary_sentences: list) -> None:
|
| 32 |
st.subheader("Summary :male-detective:")
|
| 33 |
for sentence in summary_sentences:
|
| 34 |
-
st.markdown(f"<li>{sentence
|
| 35 |
|
| 36 |
def get_list_files() -> list:
|
| 37 |
names = []
|
|
@@ -98,7 +98,6 @@ def main() -> None:
|
|
| 98 |
sentences = split_sentences_by_token_length(nltk.sent_tokenize(target_text_input), 600)
|
| 99 |
for sentence in sentences:
|
| 100 |
output = pipe(sentence)
|
| 101 |
-
# st.markdown(output[0]["summary_text"])
|
| 102 |
summary = output[0]["summary_text"]
|
| 103 |
summary_sentences.append(summary.split("."))
|
| 104 |
display_summary(summary_sentences)
|
|
|
|
| 31 |
def display_summary(summary_sentences: list) -> None:
|
| 32 |
st.subheader("Summary :male-detective:")
|
| 33 |
for sentence in summary_sentences:
|
| 34 |
+
st.markdown(f"<li>{sentence}</li>", unsafe_allow_html=True)
|
| 35 |
|
| 36 |
def get_list_files() -> list:
|
| 37 |
names = []
|
|
|
|
| 98 |
sentences = split_sentences_by_token_length(nltk.sent_tokenize(target_text_input), 600)
|
| 99 |
for sentence in sentences:
|
| 100 |
output = pipe(sentence)
|
|
|
|
| 101 |
summary = output[0]["summary_text"]
|
| 102 |
summary_sentences.append(summary.split("."))
|
| 103 |
display_summary(summary_sentences)
|