Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -141,23 +141,41 @@ if (summ_text is not None) or ('summ_text' in st.session_state):
|
|
141 |
|
142 |
st.subheader('Generated slides content')
|
143 |
# Display editable text box
|
144 |
-
|
145 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
146 |
<style>
|
147 |
.framed-text-area {
|
148 |
-
border: 2px solid #
|
149 |
border-radius: 5px;
|
150 |
padding: 10px;
|
151 |
-
margin
|
152 |
}
|
153 |
-
.framed-text-area
|
154 |
-
|
155 |
}
|
156 |
</style>
|
157 |
-
"""
|
158 |
|
159 |
-
#
|
|
|
|
|
|
|
160 |
st.markdown('<div class="framed-text-area">', unsafe_allow_html=True)
|
|
|
|
|
161 |
text = st.text_area(
|
162 |
"Edit Text",
|
163 |
st.session_state.current_text,
|
@@ -165,6 +183,8 @@ if (summ_text is not None) or ('summ_text' in st.session_state):
|
|
165 |
key="text_area_value",
|
166 |
on_change=update_text
|
167 |
)
|
|
|
|
|
168 |
st.markdown('</div>', unsafe_allow_html=True)
|
169 |
|
170 |
|
|
|
141 |
|
142 |
st.subheader('Generated slides content')
|
143 |
# Display editable text box
|
144 |
+
text = st.text_area("Edit Text", st.session_state.current_text, height=200, key="text_area_value", on_change=update_text)
|
145 |
+
|
146 |
+
# Display the framed text area
|
147 |
+
# st.markdown('<div class="framed-text-area">', unsafe_allow_html=True)
|
148 |
+
# text = st.text_area(
|
149 |
+
# "Edit Text",
|
150 |
+
# st.session_state.current_text,
|
151 |
+
# height=200,
|
152 |
+
# key="text_area_value",
|
153 |
+
# on_change=update_text
|
154 |
+
# )
|
155 |
+
# st.markdown('</div>', unsafe_allow_html=True)
|
156 |
+
|
157 |
+
# Define custom CSS
|
158 |
+
custom_css = """
|
159 |
<style>
|
160 |
.framed-text-area {
|
161 |
+
border: 2px solid #000000;
|
162 |
border-radius: 5px;
|
163 |
padding: 10px;
|
164 |
+
margin: 10px 0;
|
165 |
}
|
166 |
+
.framed-text-area .stTextArea {
|
167 |
+
border: none;
|
168 |
}
|
169 |
</style>
|
170 |
+
"""
|
171 |
|
172 |
+
# Inject custom CSS
|
173 |
+
st.markdown(custom_css, unsafe_allow_html=True)
|
174 |
+
|
175 |
+
# Create a container with the custom class
|
176 |
st.markdown('<div class="framed-text-area">', unsafe_allow_html=True)
|
177 |
+
|
178 |
+
# Your existing text area
|
179 |
text = st.text_area(
|
180 |
"Edit Text",
|
181 |
st.session_state.current_text,
|
|
|
183 |
key="text_area_value",
|
184 |
on_change=update_text
|
185 |
)
|
186 |
+
|
187 |
+
# Close the container
|
188 |
st.markdown('</div>', unsafe_allow_html=True)
|
189 |
|
190 |
|