Update app.py
Browse files
app.py
CHANGED
@@ -177,22 +177,25 @@ def main():
|
|
177 |
print("Initializing retriever...")
|
178 |
retriever = initialize_retriever()
|
179 |
|
180 |
-
|
|
|
|
|
181 |
custom_css = """
|
182 |
-
|
183 |
-
|
184 |
-
|
|
|
|
|
|
|
185 |
}
|
186 |
-
|
|
|
|
|
|
|
|
|
|
|
187 |
display: block;
|
188 |
margin: 0 auto;
|
189 |
-
max-width: 200px;
|
190 |
-
}
|
191 |
-
.datetime-display {
|
192 |
-
text-align: center;
|
193 |
-
margin-bottom: 20px;
|
194 |
-
font-size: 18px;
|
195 |
-
font-weight: bold;
|
196 |
}
|
197 |
"""
|
198 |
|
@@ -200,12 +203,20 @@ def main():
|
|
200 |
|
201 |
# Create Gradio UI
|
202 |
with gr.Blocks(css=custom_css) as ui:
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
209 |
|
210 |
# Title & Description
|
211 |
gr.Markdown("<h1 style='text-align: center; color: black;'>Equinix Chatbot for Automation Team</h1>")
|
|
|
177 |
print("Initializing retriever...")
|
178 |
retriever = initialize_retriever()
|
179 |
|
180 |
+
|
181 |
+
|
182 |
+
# Define custom CSS to style the logo across the entire header
|
183 |
custom_css = """
|
184 |
+
{
|
185 |
+
width: 100%;
|
186 |
+
background-color: #fff;
|
187 |
+
padding: 10px 0;
|
188 |
+
margin-bottom: 20px;
|
189 |
+
box-shadow: 0 2px 5px rgba(0,0,0,0.1);
|
190 |
}
|
191 |
+
|
192 |
+
#logo-image {
|
193 |
+
width: 100%;
|
194 |
+
height: auto;
|
195 |
+
max-height: 80px;
|
196 |
+
object-fit: contain;
|
197 |
display: block;
|
198 |
margin: 0 auto;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
199 |
}
|
200 |
"""
|
201 |
|
|
|
203 |
|
204 |
# Create Gradio UI
|
205 |
with gr.Blocks(css=custom_css) as ui:
|
206 |
+
|
207 |
+
# Create a header container first
|
208 |
+
with gr.Row(elem_id="header-container"):
|
209 |
+
# Check if logo exists before trying to display it
|
210 |
+
if os.path.exists(logo_path):
|
211 |
+
gr.Image(logo_path, elem_id="logo-image", show_label=False)
|
212 |
+
else:
|
213 |
+
gr.Markdown("<h2 style='text-align: center; width: 100%;'>Equinix</h2>")
|
214 |
+
print(f"Warning: Logo file {logo_path} not found")
|
215 |
+
|
216 |
+
# The rest of your UI components go here
|
217 |
+
with gr.Row():
|
218 |
+
gr.Markdown("## Your application content goes here")
|
219 |
+
|
220 |
|
221 |
# Title & Description
|
222 |
gr.Markdown("<h1 style='text-align: center; color: black;'>Equinix Chatbot for Automation Team</h1>")
|