Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -28,11 +28,11 @@ def create_pdf_tab(default_markdown):
|
|
| 28 |
selected_font_name = st.selectbox("Select NotoEmoji Font", options=list(available_fonts.keys()))
|
| 29 |
selected_font_path = available_fonts[selected_font_name]
|
| 30 |
auto_size = st.checkbox("Auto-size text", value=True)
|
| 31 |
-
base_font_size = st.slider("Base Font Size (points)", min_value=6, max_value=16, value=
|
| 32 |
if auto_size:
|
| 33 |
st.info("Font size will adjust between 6-16 points to fit content on one page, starting from your base size.")
|
| 34 |
plain_text_mode = st.checkbox("Render as Plain Text (Preserve Bold Only)", value=False)
|
| 35 |
-
num_columns = st.selectbox("Number of Columns", options=[1, 2, 3, 4, 5, 6], index=
|
| 36 |
|
| 37 |
# Register font
|
| 38 |
pdfmetrics.registerFont(TTFont(selected_font_name, selected_font_path))
|
|
@@ -202,7 +202,6 @@ def create_pdf_tab(default_markdown):
|
|
| 202 |
|
| 203 |
st.download_button(label="Save Markdown", data=st.session_state.markdown_content, file_name="deities_guide.md", mime="text/markdown")
|
| 204 |
|
| 205 |
-
|
| 206 |
default_markdown = """# π Deities Guide: Mythology and Moral Lessons π
|
| 207 |
|
| 208 |
## 1. π Introduction
|
|
@@ -361,5 +360,4 @@ default_markdown = """# π Deities Guide: Mythology and Moral Lessons π
|
|
| 361 |
3. Saints/Prophets: Virtues (e.g., justice, prophecy).
|
| 362 |
"""
|
| 363 |
|
| 364 |
-
|
| 365 |
-
create_pdf_tab(default_markdown)
|
|
|
|
| 28 |
selected_font_name = st.selectbox("Select NotoEmoji Font", options=list(available_fonts.keys()))
|
| 29 |
selected_font_path = available_fonts[selected_font_name]
|
| 30 |
auto_size = st.checkbox("Auto-size text", value=True)
|
| 31 |
+
base_font_size = st.slider("Base Font Size (points)", min_value=6, max_value=16, value=9, step=1) # Default to 9
|
| 32 |
if auto_size:
|
| 33 |
st.info("Font size will adjust between 6-16 points to fit content on one page, starting from your base size.")
|
| 34 |
plain_text_mode = st.checkbox("Render as Plain Text (Preserve Bold Only)", value=False)
|
| 35 |
+
num_columns = st.selectbox("Number of Columns", options=[1, 2, 3, 4, 5, 6], index=3) # Default to 4 columns
|
| 36 |
|
| 37 |
# Register font
|
| 38 |
pdfmetrics.registerFont(TTFont(selected_font_name, selected_font_path))
|
|
|
|
| 202 |
|
| 203 |
st.download_button(label="Save Markdown", data=st.session_state.markdown_content, file_name="deities_guide.md", mime="text/markdown")
|
| 204 |
|
|
|
|
| 205 |
default_markdown = """# π Deities Guide: Mythology and Moral Lessons π
|
| 206 |
|
| 207 |
## 1. π Introduction
|
|
|
|
| 360 |
3. Saints/Prophets: Virtues (e.g., justice, prophecy).
|
| 361 |
"""
|
| 362 |
|
| 363 |
+
create_pdf_tab(default_markdown)
|
|
|