faerazo commited on
Commit
f7f5031
·
verified ·
1 Parent(s): d6b2a9e

Update ui.py

Browse files
Files changed (1) hide show
  1. ui.py +13 -3
ui.py CHANGED
@@ -422,9 +422,9 @@ def create_interface(agent):
422
  .gradio-container .tabitem,
423
  .gradio-container [role="tabpanel"] {
424
  min-height: calc(100vh - 150px) !important;
425
- max-height: none !important;
426
- height: auto !important;
427
- overflow-y: visible !important;
428
  overflow-x: hidden !important;
429
  position: relative !important;
430
  }
@@ -459,6 +459,9 @@ def create_interface(agent):
459
  /* Mobile landscape and small tablets */
460
  .gradio-container .tabitem [role="tabpanel"] {
461
  flex-direction: column !important;
 
 
 
462
  }
463
 
464
  .sidebar {
@@ -500,6 +503,13 @@ def create_interface(agent):
500
  max-height: 350px !important;
501
  }
502
 
 
 
 
 
 
 
 
503
  .gradio-container [data-testid="bot"] .message > *,
504
  .gradio-container [data-testid="user"] .message > * {
505
  max-width: 90% !important;
 
422
  .gradio-container .tabitem,
423
  .gradio-container [role="tabpanel"] {
424
  min-height: calc(100vh - 150px) !important;
425
+ max-height: calc(100vh - 150px) !important; /* Prevent infinite expansion */
426
+ height: calc(100vh - 150px) !important; /* Fixed height for consistent behavior */
427
+ overflow-y: auto !important; /* Enable internal scrolling */
428
  overflow-x: hidden !important;
429
  position: relative !important;
430
  }
 
459
  /* Mobile landscape and small tablets */
460
  .gradio-container .tabitem [role="tabpanel"] {
461
  flex-direction: column !important;
462
+ min-height: calc(100vh - 200px) !important; /* Adjust for mobile header space */
463
+ max-height: calc(100vh - 200px) !important;
464
+ height: calc(100vh - 200px) !important;
465
  }
466
 
467
  .sidebar {
 
503
  max-height: 350px !important;
504
  }
505
 
506
+ .gradio-container .tabitem,
507
+ .gradio-container [role="tabpanel"] {
508
+ min-height: calc(100vh - 220px) !important; /* More space for mobile UI */
509
+ max-height: calc(100vh - 220px) !important;
510
+ height: calc(100vh - 220px) !important;
511
+ }
512
+
513
  .gradio-container [data-testid="bot"] .message > *,
514
  .gradio-container [data-testid="user"] .message > * {
515
  max-width: 90% !important;