-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathslapp.py
More file actions
57 lines (50 loc) · 1.29 KB
/
Copy pathslapp.py
File metadata and controls
57 lines (50 loc) · 1.29 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
import streamlit as st
from datetime import datetime
import time
if "ragfeed" not in st.session_state.keys():
from RagFeed import RagFeed
st.session_state.ragfeed = RagFeed()
sources = feed = topics = []
if "refresh_interval" not in st.session_state.keys():
# Default refresh interval (TODO: read it from settings)
st.session_state.refresh_interval = 15
# Set page config
st.set_page_config(
page_title="RagFeed",
page_icon="📰",
layout="wide"
)
# Custom CSS
st.markdown("""
<style>
.feed-item {
padding: 15px;
border-radius: 5px;
margin-bottom: 15px;
background-color: rgb(38, 39, 48);
}
.feed-title {
font-weight: bold;
font-size: 18px;
}
.feed-date {
color: #606060;
font-size: 14px;
}
.feed-summary {
margin-top: 10px;
}
button[kind="topic_link"] {
background-color: orange;
}
button[kind="seondary"] {
background-color: purple;
}
</style>
""", unsafe_allow_html=True)
pg = st.navigation([
st.Page("./slapp/feed.py", title="RSS Feed", icon=":material/newspaper:"),
st.Page("./slapp/rag.py", title="Ask Feed", icon=":material/contact_support:"),
st.Page("./slapp/settings.py", title="Settings", icon=":material/settings:"),
])
pg.run()