Spaces:
Build error
Build error
sdhanabal1
commited on
Commit
•
839b745
1
Parent(s):
5adb324
Test html rendering error
Browse files
app.py
CHANGED
@@ -49,12 +49,10 @@ def main() -> None:
|
|
49 |
replaced_text = html.escape(terms_and_conditions_text)
|
50 |
for sentence in summary_sentences:
|
51 |
sentence = html.escape(sentence)
|
52 |
-
replaced_text = replaced_text.replace(sentence,
|
53 |
-
f"<div>"
|
54 |
-
f"<span style='background-color: #FFFF00'>{sentence}</span>"
|
55 |
-
f"</div>")
|
56 |
replaced_text = replaced_text.replace('\n', '<br/>')
|
57 |
with st.container():
|
|
|
58 |
st.markdown(replaced_text, unsafe_allow_html=True)
|
59 |
|
60 |
def is_valid_url(url: str) -> bool:
|
@@ -86,7 +84,6 @@ def main() -> None:
|
|
86 |
if 'sample_choice' not in st.session_state:
|
87 |
st.session_state['sample_choice'] = ''
|
88 |
|
89 |
-
st.write('<style>div.row-widget.stRadio > div{flex-direction:row;}</style>', unsafe_allow_html=True)
|
90 |
st.header("Input")
|
91 |
|
92 |
sentences_length = st.number_input(
|
|
|
49 |
replaced_text = html.escape(terms_and_conditions_text)
|
50 |
for sentence in summary_sentences:
|
51 |
sentence = html.escape(sentence)
|
52 |
+
replaced_text = replaced_text.replace(sentence, f"<mark>{sentence}</mark>")
|
|
|
|
|
|
|
53 |
replaced_text = replaced_text.replace('\n', '<br/>')
|
54 |
with st.container():
|
55 |
+
st.write('<style>mark{background-color:yellow;}</style>', unsafe_allow_html=True)
|
56 |
st.markdown(replaced_text, unsafe_allow_html=True)
|
57 |
|
58 |
def is_valid_url(url: str) -> bool:
|
|
|
84 |
if 'sample_choice' not in st.session_state:
|
85 |
st.session_state['sample_choice'] = ''
|
86 |
|
|
|
87 |
st.header("Input")
|
88 |
|
89 |
sentences_length = st.number_input(
|