Spaces:
Build error
Build error
Update app.py
#2
by
AlvinY
- opened
app.py
CHANGED
|
@@ -460,19 +460,31 @@ def DailyNarrative():
|
|
| 460 |
dailyNarrativeText_split = split_into_sentences(dailyNarrativeText)
|
| 461 |
|
| 462 |
#st.table(dailyNoteChange) # testing to see if data calculate correctly
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 463 |
|
|
|
|
|
|
|
| 464 |
with st.expander("See in detail"):
|
| 465 |
|
| 466 |
|
| 467 |
ls = []
|
| 468 |
|
| 469 |
-
for sent in
|
| 470 |
if sent in changeNote_split:
|
| 471 |
sent = sent.replace(str(sent),str(annotation(sent)))
|
| 472 |
ls.append(sent)
|
| 473 |
else:
|
| 474 |
ls.append(sent)
|
| 475 |
-
|
|
|
|
|
|
|
| 476 |
st.markdown(highlight, unsafe_allow_html=True)
|
| 477 |
|
| 478 |
|
|
|
|
| 460 |
dailyNarrativeText_split = split_into_sentences(dailyNarrativeText)
|
| 461 |
|
| 462 |
#st.table(dailyNoteChange) # testing to see if data calculate correctly
|
| 463 |
+
|
| 464 |
+
annt_ls = []
|
| 465 |
+
for sent in dailyNarrativeText_split:
|
| 466 |
+
if '<br><br>' in sent:
|
| 467 |
+
break
|
| 468 |
+
else:
|
| 469 |
+
end_index = dailyNarrativeText_split.index(sent) + 1
|
| 470 |
+
annt_ls.append(sent)
|
| 471 |
|
| 472 |
+
non_annt_ls = dailyNarrativeText_split[end_index:]
|
| 473 |
+
|
| 474 |
with st.expander("See in detail"):
|
| 475 |
|
| 476 |
|
| 477 |
ls = []
|
| 478 |
|
| 479 |
+
for sent in annt_ls:
|
| 480 |
if sent in changeNote_split:
|
| 481 |
sent = sent.replace(str(sent),str(annotation(sent)))
|
| 482 |
ls.append(sent)
|
| 483 |
else:
|
| 484 |
ls.append(sent)
|
| 485 |
+
|
| 486 |
+
ls2 = ls + non_annt_ls
|
| 487 |
+
highlight = ' '.join(ls2)
|
| 488 |
st.markdown(highlight, unsafe_allow_html=True)
|
| 489 |
|
| 490 |
|