Spaces:
Build error
Build error
Update app.py
Browse filesedit logo size
app.py
CHANGED
|
@@ -292,25 +292,23 @@ def update_stats_display(team_name):
|
|
| 292 |
with gr.Blocks(theme=gr.themes.Soft()) as demo:
|
| 293 |
|
| 294 |
# --- Display Logo ---
|
| 295 |
-
# Check if the logo file exists before trying to display it
|
| 296 |
if os.path.exists(LOGO_FILE_PATH):
|
| 297 |
-
# Display the logo, centered, with a fixed height
|
| 298 |
-
# Wrap in a Row and Column for centering (may need CSS for perfect centering)
|
| 299 |
with gr.Row():
|
| 300 |
-
with gr.Column(scale=1): #
|
| 301 |
pass
|
| 302 |
-
with gr.Column(scale=2):
|
| 303 |
gr.Image(
|
| 304 |
value=LOGO_FILE_PATH,
|
| 305 |
label="EQ Betz Logo",
|
| 306 |
-
show_label=False,
|
| 307 |
-
|
| 308 |
-
width=
|
| 309 |
-
|
| 310 |
-
|
| 311 |
-
|
|
|
|
| 312 |
)
|
| 313 |
-
with gr.Column(scale=1): #
|
| 314 |
pass
|
| 315 |
else:
|
| 316 |
print(f"Warning: Logo file not found at {LOGO_FILE_PATH}")
|
|
|
|
| 292 |
with gr.Blocks(theme=gr.themes.Soft()) as demo:
|
| 293 |
|
| 294 |
# --- Display Logo ---
|
|
|
|
| 295 |
if os.path.exists(LOGO_FILE_PATH):
|
|
|
|
|
|
|
| 296 |
with gr.Row():
|
| 297 |
+
with gr.Column(scale=1, min_width=50): # Add min_width for small screens
|
| 298 |
pass
|
| 299 |
+
with gr.Column(scale=2):
|
| 300 |
gr.Image(
|
| 301 |
value=LOGO_FILE_PATH,
|
| 302 |
label="EQ Betz Logo",
|
| 303 |
+
show_label=False,
|
| 304 |
+
# Set width instead of height
|
| 305 |
+
width=200, # Adjust this value to make logo smaller/larger
|
| 306 |
+
height=None, # Let height adjust based on aspect ratio
|
| 307 |
+
interactive=False,
|
| 308 |
+
container=False,
|
| 309 |
+
elem_classes="logo-image"
|
| 310 |
)
|
| 311 |
+
with gr.Column(scale=1, min_width=50): # Add min_width for small screens
|
| 312 |
pass
|
| 313 |
else:
|
| 314 |
print(f"Warning: Logo file not found at {LOGO_FILE_PATH}")
|