Jaiwincr7 commited on
Commit
0420f38
·
1 Parent(s): bda7cfd

FINAL FIX: Removed redundant 'bytes()' conversion in app.py to correct PDF data type mismatch.

Browse files
Files changed (1) hide show
  1. src/streamlit_app.py +12 -8
src/streamlit_app.py CHANGED
@@ -74,13 +74,17 @@ else:
74
  else:
75
  st.warning("Please enter a task")
76
 
77
- if st.session_state.pdf_bytes: # Check if it exists and is non-empty
78
-         st.download_button(
79
-             label="📥 Download Test Cases PDF",
80
-             data=st.session_state.pdf_bytes,
81
-             file_name="test_cases.pdf",
82
-             mime="application/pdf",
83
-             key="download_pdf"
84
-         )
 
 
 
 
85
 
86
 
 
74
  else:
75
  st.warning("Please enter a task")
76
 
77
+ st.divider()
78
+
79
+ if st.session_state.get("pdf_bytes"):
80
+ st.success("PDF ready")
81
+ st.download_button(
82
+ label="📥 Download Test Cases PDF",
83
+ data=st.session_state["pdf_bytes"],
84
+ file_name="test_cases.pdf",
85
+ mime="application/pdf",
86
+ key="download_pdf"
87
+ )
88
+
89
 
90