faerazo commited on
Commit
36010a3
·
verified ·
1 Parent(s): 79f1374

Update ui.py

Browse files
Files changed (1) hide show
  1. ui.py +13 -7
ui.py CHANGED
@@ -403,17 +403,23 @@ def create_interface(agent):
403
 
404
  /* Specific constraints for tab DataFrames */
405
  .gradio-container .tabitem .dataframe {
406
- max-height: calc(100vh - 350px) !important; /* Even more constrained in tabs */
407
  overflow-y: auto !important;
408
  }
409
 
410
  /* Constrain textboxes in tabs */
411
  .gradio-container .tabitem textarea,
412
  .gradio-container .tabitem .textbox textarea {
413
- max-height: calc(100vh - 400px) !important; /* Limit textbox height in tabs */
414
  overflow-y: auto !important;
415
  }
416
 
 
 
 
 
 
 
417
  @media (max-width: 768px) {
418
  .gradio-container table {
419
  font-size: 12px !important;
@@ -421,12 +427,12 @@ def create_interface(agent):
421
 
422
  /* Tighter constraints for mobile */
423
  .gradio-container .tabitem .dataframe {
424
- max-height: calc(100vh - 400px) !important;
425
  }
426
 
427
  .gradio-container .tabitem textarea,
428
  .gradio-container .tabitem .textbox textarea {
429
- max-height: calc(100vh - 450px) !important;
430
  }
431
  }
432
 
@@ -447,9 +453,9 @@ def create_interface(agent):
447
  /* Ensure proper scrolling in tabs - Critical for HF Spaces */
448
  .gradio-container .tabitem,
449
  .gradio-container [role="tabpanel"] {
450
- min-height: calc(100vh - 150px) !important;
451
- max-height: calc(100vh - 150px) !important; /* Prevent infinite expansion */
452
- height: calc(100vh - 150px) !important; /* Fixed height for consistent behavior */
453
  overflow-y: auto !important; /* Enable internal scrolling */
454
  overflow-x: hidden !important;
455
  position: relative !important;
 
403
 
404
  /* Specific constraints for tab DataFrames */
405
  .gradio-container .tabitem .dataframe {
406
+ max-height: 400px !important; /* Fixed max height for DataFrames */
407
  overflow-y: auto !important;
408
  }
409
 
410
  /* Constrain textboxes in tabs */
411
  .gradio-container .tabitem textarea,
412
  .gradio-container .tabitem .textbox textarea {
413
+ max-height: 300px !important; /* Fixed max height for textboxes */
414
  overflow-y: auto !important;
415
  }
416
 
417
+ /* Prevent tab content from expanding */
418
+ .gradio-container .tabitem [role="tabpanel"] > div {
419
+ max-height: none !important; /* Reset any inherited max-height */
420
+ height: auto !important; /* Allow natural sizing */
421
+ }
422
+
423
  @media (max-width: 768px) {
424
  .gradio-container table {
425
  font-size: 12px !important;
 
427
 
428
  /* Tighter constraints for mobile */
429
  .gradio-container .tabitem .dataframe {
430
+ max-height: 300px !important; /* Fixed height on mobile */
431
  }
432
 
433
  .gradio-container .tabitem textarea,
434
  .gradio-container .tabitem .textbox textarea {
435
+ max-height: 200px !important; /* Fixed height on mobile */
436
  }
437
  }
438
 
 
453
  /* Ensure proper scrolling in tabs - Critical for HF Spaces */
454
  .gradio-container .tabitem,
455
  .gradio-container [role="tabpanel"] {
456
+ min-height: 0 !important; /* Allow natural height */
457
+ max-height: calc(100vh - 150px) !important; /* Prevent infinite expansion */
458
+ height: auto !important; /* Let content determine height */
459
  overflow-y: auto !important; /* Enable internal scrolling */
460
  overflow-x: hidden !important;
461
  position: relative !important;