Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -37,62 +37,110 @@ def get_rag_model():
|
|
37 |
# Custom CSS for styling
|
38 |
def load_css():
|
39 |
st.markdown("""
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
.
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
.
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
96 |
# Streamlit app
|
97 |
def main():
|
98 |
# Load custom CSS
|
|
|
37 |
# Custom CSS for styling
|
38 |
def load_css():
|
39 |
st.markdown("""
|
40 |
+
<style>
|
41 |
+
/* App Background */
|
42 |
+
.stApp {
|
43 |
+
background: #f8f9fa; /* Light gray background */
|
44 |
+
}
|
45 |
+
|
46 |
+
/* Header Styling */
|
47 |
+
.stHeader {
|
48 |
+
color: #2c3e50; /* Dark blue-gray */
|
49 |
+
font-size: 2.5rem;
|
50 |
+
font-weight: bold;
|
51 |
+
text-align: center;
|
52 |
+
margin-bottom: 20px;
|
53 |
+
}
|
54 |
+
|
55 |
+
/* Form Styling */
|
56 |
+
.stForm {
|
57 |
+
background: white;
|
58 |
+
padding: 25px;
|
59 |
+
border-radius: 12px;
|
60 |
+
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
|
61 |
+
margin: 20px auto;
|
62 |
+
max-width: 800px;
|
63 |
+
}
|
64 |
+
|
65 |
+
/* Button Styling */
|
66 |
+
.stButton button {
|
67 |
+
background-color: #3498db; /* Blue */
|
68 |
+
color: white;
|
69 |
+
border-radius: 8px;
|
70 |
+
padding: 12px 24px;
|
71 |
+
font-size: 1rem;
|
72 |
+
border: none;
|
73 |
+
transition: background-color 0.3s ease;
|
74 |
+
}
|
75 |
+
.stButton button:hover {
|
76 |
+
background-color: #2980b9; /* Darker blue on hover */
|
77 |
+
}
|
78 |
+
|
79 |
+
/* Markdown Headers */
|
80 |
+
.stMarkdown h3 {
|
81 |
+
color: #2c3e50; /* Dark blue-gray */
|
82 |
+
margin-top: 20px;
|
83 |
+
font-size: 1.8rem;
|
84 |
+
font-weight: 600;
|
85 |
+
}
|
86 |
+
|
87 |
+
/* Expander Styling */
|
88 |
+
.stExpander {
|
89 |
+
background: white;
|
90 |
+
border-radius: 12px;
|
91 |
+
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
|
92 |
+
margin: 20px 0;
|
93 |
+
}
|
94 |
+
.stExpander .stMarkdown {
|
95 |
+
padding: 15px;
|
96 |
+
}
|
97 |
+
|
98 |
+
/* DataFrame Styling */
|
99 |
+
.stDataFrame {
|
100 |
+
border-radius: 12px;
|
101 |
+
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
|
102 |
+
}
|
103 |
+
|
104 |
+
/* Custom Color for Results */
|
105 |
+
.stMarkdown p, .stMarkdown ul, .stMarkdown ol {
|
106 |
+
color: rgb(1, 27, 29); /* Custom color for results */
|
107 |
+
font-size: 1rem;
|
108 |
+
line-height: 1.6;
|
109 |
+
}
|
110 |
+
.stMarkdown a {
|
111 |
+
color: #3498db; /* Blue for links */
|
112 |
+
text-decoration: none;
|
113 |
+
font-weight: 500;
|
114 |
+
}
|
115 |
+
.stMarkdown a:hover {
|
116 |
+
text-decoration: underline;
|
117 |
+
}
|
118 |
+
|
119 |
+
/* Spinner Styling */
|
120 |
+
.stSpinner {
|
121 |
+
color: #3498db; /* Blue spinner */
|
122 |
+
}
|
123 |
+
|
124 |
+
/* Hero Section Styling */
|
125 |
+
.hero {
|
126 |
+
text-align: center;
|
127 |
+
padding: 50px 20px;
|
128 |
+
background: linear-gradient(135deg, #3498db, #2980b9); /* Blue gradient */
|
129 |
+
color: white;
|
130 |
+
border-radius: 12px;
|
131 |
+
margin-bottom: 30px;
|
132 |
+
}
|
133 |
+
.hero h1 {
|
134 |
+
font-size: 3rem;
|
135 |
+
font-weight: 700;
|
136 |
+
margin-bottom: 10px;
|
137 |
+
}
|
138 |
+
.hero p {
|
139 |
+
font-size: 1.2rem;
|
140 |
+
opacity: 0.9;
|
141 |
+
}
|
142 |
+
</style>
|
143 |
+
""", unsafe_allow_html=True)
|
144 |
# Streamlit app
|
145 |
def main():
|
146 |
# Load custom CSS
|