Update app.py
Browse files
app.py
CHANGED
@@ -99,6 +99,7 @@ def login_page():
|
|
99 |
st.session_state.authenticated = True
|
100 |
st.session_state.username = username
|
101 |
st.session_state.page = "project_staging" # Updated from "workspace"
|
|
|
102 |
else:
|
103 |
st.error("Invalid username or password. Please try again.")
|
104 |
|
@@ -504,11 +505,10 @@ def generate_documentation_page():
|
|
504 |
markdown_path = os.path.join(user_folder, f"{st.session_state.current_project}_Documentation.md")
|
505 |
|
506 |
# Generate PDF Button
|
507 |
-
if not os.path.exists(pdf_path)
|
508 |
if st.button("Generate PDF"):
|
509 |
try:
|
510 |
generate_pdf(documentation, pdf_path)
|
511 |
-
st.session_state.pdf_generated = True
|
512 |
st.rerun()
|
513 |
st.success("PDF Available in the 'Saved Documentation' Page.")
|
514 |
except Exception as e:
|
@@ -517,11 +517,10 @@ def generate_documentation_page():
|
|
517 |
st.success("PDF has already been generated! Check the 'Saved Documentation' Page.")
|
518 |
|
519 |
# Generate Markdown Button
|
520 |
-
if not os.path.exists(markdown_path)
|
521 |
if st.button("Generate Markdown File"):
|
522 |
try:
|
523 |
generate_markdown_file(documentation, markdown_path)
|
524 |
-
st.session_state.markdown_generated = True # Set a flag for Markdown generation
|
525 |
st.rerun() # Trigger a rerun to show the download button
|
526 |
st.success("Markdown Available in the 'Saved Documentation' Page.")
|
527 |
except Exception as e:
|
|
|
99 |
st.session_state.authenticated = True
|
100 |
st.session_state.username = username
|
101 |
st.session_state.page = "project_staging" # Updated from "workspace"
|
102 |
+
st.rerun()
|
103 |
else:
|
104 |
st.error("Invalid username or password. Please try again.")
|
105 |
|
|
|
505 |
markdown_path = os.path.join(user_folder, f"{st.session_state.current_project}_Documentation.md")
|
506 |
|
507 |
# Generate PDF Button
|
508 |
+
if not os.path.exists(pdf_path):
|
509 |
if st.button("Generate PDF"):
|
510 |
try:
|
511 |
generate_pdf(documentation, pdf_path)
|
|
|
512 |
st.rerun()
|
513 |
st.success("PDF Available in the 'Saved Documentation' Page.")
|
514 |
except Exception as e:
|
|
|
517 |
st.success("PDF has already been generated! Check the 'Saved Documentation' Page.")
|
518 |
|
519 |
# Generate Markdown Button
|
520 |
+
if not os.path.exists(markdown_path):
|
521 |
if st.button("Generate Markdown File"):
|
522 |
try:
|
523 |
generate_markdown_file(documentation, markdown_path)
|
|
|
524 |
st.rerun() # Trigger a rerun to show the download button
|
525 |
st.success("Markdown Available in the 'Saved Documentation' Page.")
|
526 |
except Exception as e:
|