Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -70,12 +70,18 @@ def main():
|
|
| 70 |
csv_df.columns = ["ID", "Hadith", "Explanation"]
|
| 71 |
else:
|
| 72 |
csv_df.columns = ["ID", "Hadith"]
|
| 73 |
-
|
| 74 |
|
| 75 |
def display_home():
|
| 76 |
st.title("Hadith Viewer")
|
| 77 |
st.image("https://raw.githubusercontent.com/halimbahae/Hadith/main/Hadith_Books.jpg", caption="Hadith Books", use_column_width=True)
|
| 78 |
st.write("Welcome to the Hadith Viewer! This is a viewer for the Hadith collections. You can select a book from the dropdown menu on the left to view its contents.")
|
| 79 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 80 |
if __name__ == "__main__":
|
| 81 |
main()
|
|
|
|
| 70 |
csv_df.columns = ["ID", "Hadith", "Explanation"]
|
| 71 |
else:
|
| 72 |
csv_df.columns = ["ID", "Hadith"]
|
| 73 |
+
display_table(csv_df)
|
| 74 |
|
| 75 |
def display_home():
|
| 76 |
st.title("Hadith Viewer")
|
| 77 |
st.image("https://raw.githubusercontent.com/halimbahae/Hadith/main/Hadith_Books.jpg", caption="Hadith Books", use_column_width=True)
|
| 78 |
st.write("Welcome to the Hadith Viewer! This is a viewer for the Hadith collections. You can select a book from the dropdown menu on the left to view its contents.")
|
| 79 |
|
| 80 |
+
def display_table(csv_df):
|
| 81 |
+
# Increase font size
|
| 82 |
+
font_size = st.slider("Adjust Font Size", min_value=10, max_value=30, value=20)
|
| 83 |
+
st.write(f"## Table View (Font Size: {font_size}px)")
|
| 84 |
+
st.table(csv_df.style.set_table_styles([dict(selector="th",props=[('font-size', f'{font_size}px')])]))
|
| 85 |
+
|
| 86 |
if __name__ == "__main__":
|
| 87 |
main()
|