Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -183,6 +183,18 @@ class ChunkManager:
|
|
| 183 |
# --- Streamlit UI Application ---
|
| 184 |
st.set_page_config(layout="wide", page_title="Webpage Content Editor")
|
| 185 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 186 |
def init_session_state():
|
| 187 |
if 'processor' not in st.session_state:
|
| 188 |
st.session_state.processor = WebpageContentProcessor()
|
|
@@ -198,10 +210,8 @@ init_session_state()
|
|
| 198 |
processor = st.session_state.processor
|
| 199 |
manager = st.session_state.manager
|
| 200 |
|
| 201 |
-
|
| 202 |
-
# --- MODIFIED: Settings and Overview moved to a persistent sidebar ---
|
| 203 |
with st.sidebar:
|
| 204 |
-
st.image
|
| 205 |
st.title("Settings & Overview")
|
| 206 |
|
| 207 |
with st.expander("About this App & AI Writing Guidelines", expanded=True):
|
|
@@ -237,7 +247,6 @@ with st.sidebar:
|
|
| 237 |
st.subheader("π Final Compiled Document")
|
| 238 |
st.text_area("Final Markdown Output", manager.get_final_markdown(), height=300, key="final_markdown")
|
| 239 |
|
| 240 |
-
|
| 241 |
# --- Main Page Layout ---
|
| 242 |
st.title("π Chunk Webpage Content Editor")
|
| 243 |
st.caption("A tool to fetch, chunk, and refine web content for AI synthesis. Inspired by Andrea Volpini's work.")
|
|
@@ -267,7 +276,6 @@ if st.session_state.status_message:
|
|
| 267 |
st.toast(st.session_state.status_message)
|
| 268 |
st.session_state.status_message = ""
|
| 269 |
|
| 270 |
-
# --- MODIFIED: Removed tabs, editor is now the main view ---
|
| 271 |
chunks = manager.get_chunks()
|
| 272 |
if not chunks:
|
| 273 |
st.write("Process a URL to begin editing content chunks, or adjust settings in the sidebar.")
|
|
|
|
| 183 |
# --- Streamlit UI Application ---
|
| 184 |
st.set_page_config(layout="wide", page_title="Webpage Content Editor")
|
| 185 |
|
| 186 |
+
# --- MODIFIED: Custom CSS to increase sidebar width ---
|
| 187 |
+
st.markdown(
|
| 188 |
+
"""
|
| 189 |
+
<style>
|
| 190 |
+
[data-testid="stSidebar"] {
|
| 191 |
+
width: 450px !important;
|
| 192 |
+
}
|
| 193 |
+
</style>
|
| 194 |
+
""",
|
| 195 |
+
unsafe_allow_html=True
|
| 196 |
+
)
|
| 197 |
+
|
| 198 |
def init_session_state():
|
| 199 |
if 'processor' not in st.session_state:
|
| 200 |
st.session_state.processor = WebpageContentProcessor()
|
|
|
|
| 210 |
processor = st.session_state.processor
|
| 211 |
manager = st.session_state.manager
|
| 212 |
|
|
|
|
|
|
|
| 213 |
with st.sidebar:
|
| 214 |
+
# --- MODIFIED: Removed the st.image line for the logo ---
|
| 215 |
st.title("Settings & Overview")
|
| 216 |
|
| 217 |
with st.expander("About this App & AI Writing Guidelines", expanded=True):
|
|
|
|
| 247 |
st.subheader("π Final Compiled Document")
|
| 248 |
st.text_area("Final Markdown Output", manager.get_final_markdown(), height=300, key="final_markdown")
|
| 249 |
|
|
|
|
| 250 |
# --- Main Page Layout ---
|
| 251 |
st.title("π Chunk Webpage Content Editor")
|
| 252 |
st.caption("A tool to fetch, chunk, and refine web content for AI synthesis. Inspired by Andrea Volpini's work.")
|
|
|
|
| 276 |
st.toast(st.session_state.status_message)
|
| 277 |
st.session_state.status_message = ""
|
| 278 |
|
|
|
|
| 279 |
chunks = manager.get_chunks()
|
| 280 |
if not chunks:
|
| 281 |
st.write("Process a URL to begin editing content chunks, or adjust settings in the sidebar.")
|