Spaces:
Running
Running
Update main.py
Browse files
main.py
CHANGED
@@ -855,26 +855,19 @@ styled_table = (
|
|
855 |
)
|
856 |
.set_properties(
|
857 |
**{
|
858 |
-
"text-align": "center", # Center the text
|
859 |
"padding": "10px", # Add padding for better readability
|
860 |
"word-wrap": "break-word", # Ensure text wraps within cells
|
861 |
}
|
862 |
)
|
863 |
-
# .set_table_styles(
|
864 |
-
# [
|
865 |
-
# {"selector": "table", "props": [("margin-left", "auto"), ("margin-right", "auto"), ("width", "100%"), ("border-collapse", "collapse")]} # Center table and make it responsive
|
866 |
-
# ]
|
867 |
-
# )
|
868 |
.hide(axis="index") # Hide the row index
|
869 |
)
|
870 |
|
871 |
table_html_data = styled_table._repr_html_()
|
872 |
-
#
|
873 |
table_div_data = Div(
|
874 |
-
NotStr(table_html_data),
|
875 |
-
|
876 |
-
|
877 |
-
|
878 |
)
|
879 |
|
880 |
|
|
|
855 |
)
|
856 |
.set_properties(
|
857 |
**{
|
858 |
+
"text-align": "center", # Center the text in each cell
|
859 |
"padding": "10px", # Add padding for better readability
|
860 |
"word-wrap": "break-word", # Ensure text wraps within cells
|
861 |
}
|
862 |
)
|
|
|
|
|
|
|
|
|
|
|
863 |
.hide(axis="index") # Hide the row index
|
864 |
)
|
865 |
|
866 |
table_html_data = styled_table._repr_html_()
|
867 |
+
# Wrap the table in a Div, ensuring it is centered
|
868 |
table_div_data = Div(
|
869 |
+
NotStr(table_html_data),
|
870 |
+
style="margin: 20px auto; width: 80%; max-width: 100%; text-align: center; overflow-x: auto;"
|
|
|
|
|
871 |
)
|
872 |
|
873 |
|