OttoCorrect commited on
Commit
48dae47
·
verified ·
1 Parent(s): c6e5499

Update app.py

Browse files

edit logo size

Files changed (1) hide show
  1. app.py +10 -12
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): # Empty column for spacing
301
  pass
302
- with gr.Column(scale=2): # Column for the image
303
  gr.Image(
304
  value=LOGO_FILE_PATH,
305
  label="EQ Betz Logo",
306
- show_label=False, # Hide the label text
307
- height=100, # Adjust height as needed
308
- width=None, # Let width adjust automatically
309
- interactive=False, # Make it non-interactive
310
- container=False, # Remove border/container around image
311
- elem_classes="logo-image" # Add a CSS class if needed for styling
 
312
  )
313
- with gr.Column(scale=1): # Empty column for spacing
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}")