Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
Update app.py
Browse files
app.py
CHANGED
@@ -673,9 +673,39 @@ def display_file_manager_sidebar(groups_sorted):
|
|
673 |
|
674 |
# 🎯 11. Main Application
|
675 |
def main():
|
676 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
677 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
678 |
|
|
|
|
|
|
|
679 |
# Add global marquee settings near top of main
|
680 |
marquee_settings = display_marquee_controls()
|
681 |
|
|
|
673 |
|
674 |
# 🎯 11. Main Application
|
675 |
def main():
|
676 |
+
# Add global marquee settings near top of main
|
677 |
+
marquee_settings = display_marquee_controls()
|
678 |
+
|
679 |
+
# Initialize content holder in session state if not present
|
680 |
+
if 'marquee_content' not in st.session_state:
|
681 |
+
st.session_state['marquee_content'] = "🚀 Welcome to TalkingAIResearcher | 🤖 Your Research Assistant"
|
682 |
+
|
683 |
+
# Load files first
|
684 |
+
groups_sorted = load_files_for_sidebar()
|
685 |
+
|
686 |
+
# Marquee display with larger text and dynamic content
|
687 |
+
streamlit_marquee(
|
688 |
+
content=st.session_state['marquee_content'],
|
689 |
+
**{
|
690 |
+
**marquee_settings,
|
691 |
+
"font-size": "28px",
|
692 |
+
"lineHeight": "50px"
|
693 |
+
},
|
694 |
+
key="dynamic_marquee"
|
695 |
+
)
|
696 |
|
697 |
+
# Update marquee content when viewing files
|
698 |
+
if st.session_state.viewing_prefix:
|
699 |
+
for group_name, files in groups_sorted:
|
700 |
+
if group_name == st.session_state.viewing_prefix:
|
701 |
+
for f in files:
|
702 |
+
if f.endswith('.md'):
|
703 |
+
with open(f, 'r', encoding='utf-8') as file:
|
704 |
+
st.session_state['marquee_content'] = file.read()[:500]
|
705 |
|
706 |
+
# Rest of your main() code...
|
707 |
+
st.sidebar.markdown("### 🚀 TalkingAIResearcher | 🤖 Your Research Assistant")
|
708 |
+
|
709 |
# Add global marquee settings near top of main
|
710 |
marquee_settings = display_marquee_controls()
|
711 |
|