CarisMu commited on
Commit
5614f01
1 Parent(s): d6d69e3

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +10 -5
main.py CHANGED
@@ -566,10 +566,12 @@ styled_table = (
566
  :, new_dataset_comparison1.columns.difference(["TxT360"])
567
  ], # Apply to all columns except "TxT360"
568
  )
569
- .set_table_styles(
570
- [
571
- {"selector": "table", "props": [("margin-left", "auto"), ("width", "100%")]}, # Make table responsive and centered
572
- ]
 
 
573
  )
574
  .hide(axis="index") # Hide the row index
575
  )
@@ -578,7 +580,10 @@ styled_table = (
578
  table_html = styled_table._repr_html_()
579
  # table_html = dataset_comparison1.to_html(index=False, border=0)
580
  # new_table_div_1 = Div(NotStr(table_html), style="margin: 40px;")
581
- new_table_div_1 = Div(NotStr(table_html))
 
 
 
582
 
583
 
584
  dataset_comparison1 = pd.DataFrame(
 
566
  :, new_dataset_comparison1.columns.difference(["TxT360"])
567
  ], # Apply to all columns except "TxT360"
568
  )
569
+ .set_properties(
570
+ **{
571
+ "text-align": "left", # Left the text in each cell
572
+ "padding": "10px", # Add padding for better readability
573
+ "word-wrap": "break-word", # Ensure text wraps within cells
574
+ }
575
  )
576
  .hide(axis="index") # Hide the row index
577
  )
 
580
  table_html = styled_table._repr_html_()
581
  # table_html = dataset_comparison1.to_html(index=False, border=0)
582
  # new_table_div_1 = Div(NotStr(table_html), style="margin: 40px;")
583
+ new_table_div_1 = Div(
584
+ NotStr(table_html),
585
+ style="margin: 20px auto; width: 80%; max-width: 100%; text-align: left; overflow-x: auto;"
586
+ )
587
 
588
 
589
  dataset_comparison1 = pd.DataFrame(