Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -209,7 +209,26 @@ if (summ_text is not None) or ('summ_text' in st.session_state):
|
|
209 |
st.button("Next", on_click=turn_page, args=("next",))
|
210 |
|
211 |
# Display HTML box
|
212 |
-
st.markdown(st.session_state.current_text)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
213 |
|
214 |
def render_markdown_to_html(markdown_str):
|
215 |
return markdown.markdown(markdown_str)
|
|
|
209 |
st.button("Next", on_click=turn_page, args=("next",))
|
210 |
|
211 |
# Display HTML box
|
212 |
+
# st.markdown(st.session_state.current_text)
|
213 |
+
|
214 |
+
# CSS styling to create a frame
|
215 |
+
frame_css = """
|
216 |
+
<style>
|
217 |
+
.framed-text {
|
218 |
+
border: 2px solid #4CAF50; /* Border color */
|
219 |
+
padding: 10px; /* Space inside the border */
|
220 |
+
border-radius: 5px; /* Rounded corners */
|
221 |
+
background-color: #f9f9f9; /* Background color */
|
222 |
+
margin: 10px 0; /* Margin around the frame */
|
223 |
+
}
|
224 |
+
</style>
|
225 |
+
"""
|
226 |
+
|
227 |
+
# Inject CSS into the Streamlit app
|
228 |
+
st.markdown(frame_css, unsafe_allow_html=True)
|
229 |
+
|
230 |
+
# Display text within a div that uses the framed-text class
|
231 |
+
st.markdown(f'<div class="framed-text">{st.session_state.current_text}</div>', unsafe_allow_html=True)
|
232 |
|
233 |
def render_markdown_to_html(markdown_str):
|
234 |
return markdown.markdown(markdown_str)
|