eagle0504 commited on
Commit
f4d90cd
·
verified ·
1 Parent(s): d211347

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. app.py +56 -2
app.py CHANGED
@@ -20,7 +20,7 @@ st.set_page_config(
20
  initial_sidebar_state="expanded"
21
  )
22
 
23
- # Custom CSS
24
  st.markdown("""
25
  <style>
26
  .main-header {
@@ -39,24 +39,78 @@ st.markdown("""
39
  margin: 0.5rem 0;
40
  }
41
  .news-item {
42
- background: #f8f9fa;
 
43
  padding: 1rem;
44
  border-radius: 8px;
45
  margin: 0.5rem 0;
46
  border-left: 4px solid #1f77b4;
 
 
 
 
 
 
 
 
 
 
47
  }
48
  .chat-message {
49
  padding: 1rem;
50
  border-radius: 10px;
51
  margin: 0.5rem 0;
 
 
52
  }
53
  .user-message {
54
  background: #e3f2fd;
 
55
  margin-left: 2rem;
 
 
 
 
56
  }
57
  .assistant-message {
58
  background: #f1f8e9;
 
59
  margin-right: 2rem;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
60
  }
61
  </style>
62
  """, unsafe_allow_html=True)
 
20
  initial_sidebar_state="expanded"
21
  )
22
 
23
+ # Custom CSS with improved styling
24
  st.markdown("""
25
  <style>
26
  .main-header {
 
39
  margin: 0.5rem 0;
40
  }
41
  .news-item {
42
+ background: #ffffff;
43
+ border: 1px solid #e0e0e0;
44
  padding: 1rem;
45
  border-radius: 8px;
46
  margin: 0.5rem 0;
47
  border-left: 4px solid #1f77b4;
48
+ box-shadow: 0 2px 4px rgba(0,0,0,0.1);
49
+ }
50
+ .news-item strong {
51
+ color: #2c3e50;
52
+ font-size: 14px;
53
+ line-height: 1.4;
54
+ }
55
+ .news-item small {
56
+ color: #7f8c8d;
57
+ font-size: 12px;
58
  }
59
  .chat-message {
60
  padding: 1rem;
61
  border-radius: 10px;
62
  margin: 0.5rem 0;
63
+ border: 1px solid #e0e0e0;
64
+ box-shadow: 0 2px 4px rgba(0,0,0,0.05);
65
  }
66
  .user-message {
67
  background: #e3f2fd;
68
+ border-left: 4px solid #2196f3;
69
  margin-left: 2rem;
70
+ color: #1565c0;
71
+ }
72
+ .user-message strong {
73
+ color: #0d47a1;
74
  }
75
  .assistant-message {
76
  background: #f1f8e9;
77
+ border-left: 4px solid #4caf50;
78
  margin-right: 2rem;
79
+ color: #2e7d32;
80
+ }
81
+ .assistant-message strong {
82
+ color: #1b5e20;
83
+ }
84
+
85
+ /* Override Streamlit's default text colors */
86
+ .news-item * {
87
+ color: inherit !important;
88
+ }
89
+ .chat-message * {
90
+ color: inherit !important;
91
+ }
92
+
93
+ /* Ensure readability in dark mode */
94
+ @media (prefers-color-scheme: dark) {
95
+ .news-item {
96
+ background: #2c3e50;
97
+ border-color: #34495e;
98
+ color: #ecf0f1;
99
+ }
100
+ .news-item strong {
101
+ color: #ecf0f1;
102
+ }
103
+ .news-item small {
104
+ color: #bdc3c7;
105
+ }
106
+ .user-message {
107
+ background: #1a237e;
108
+ color: #e8eaf6;
109
+ }
110
+ .assistant-message {
111
+ background: #1b5e20;
112
+ color: #e8f5e8;
113
+ }
114
  }
115
  </style>
116
  """, unsafe_allow_html=True)