Update app.py
Browse files
app.py
CHANGED
@@ -197,25 +197,30 @@ def main():
|
|
197 |
display: block;
|
198 |
margin: 0 auto;
|
199 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
200 |
"""
|
201 |
|
202 |
logo_path = "Equinix-LOGO.jpeg" # Make sure this file exists or update the path
|
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 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
|
220 |
|
221 |
# Title & Description
|
|
|
197 |
display: block;
|
198 |
margin: 0 auto;
|
199 |
}
|
200 |
+
|
201 |
+
.logo-image {
|
202 |
+
max-height: 80px;
|
203 |
+
width: auto;
|
204 |
+
display: inline-block;
|
205 |
+
}
|
206 |
+
|
207 |
"""
|
208 |
|
209 |
logo_path = "Equinix-LOGO.jpeg" # Make sure this file exists or update the path
|
210 |
|
211 |
# Create Gradio UI
|
212 |
with gr.Blocks(css=custom_css) as ui:
|
|
|
|
|
213 |
with gr.Row(elem_id="header-container"):
|
214 |
+
with gr.Column(elem_id="logo-wrapper"):
|
215 |
+
if os.path.exists(logo_path):
|
216 |
+
# Using HTML component for more control over image rendering
|
217 |
+
gr.HTML(f'<img src="file/{logo_path}" class="logo-image" alt="Equinix Logo">')
|
218 |
+
# Debug message to console
|
219 |
+
print(f"Logo file found at {os.path.abspath(logo_path)}")
|
220 |
+
else:
|
221 |
+
gr.Markdown("<h2>Equinix</h2>")
|
222 |
+
print(f"Warning: Logo file {logo_path} not found at {os.path.abspath(logo_path)}")
|
223 |
+
|
224 |
|
225 |
|
226 |
# Title & Description
|