Jaiwincr7 commited on
Commit
112effb
Β·
1 Parent(s): 0420f38

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

Browse files
Files changed (3) hide show
  1. app.py +1 -1
  2. main.py β†’ pdf_utils.py +0 -0
  3. src/streamlit_app.py +3 -2
app.py CHANGED
@@ -1,6 +1,6 @@
1
  import streamlit as st
2
  from merged import load_model_and_tokenizer, generate_code_stream
3
- from main import test_case
4
 
5
  st.write("πŸš€ App started")
6
  # ---------------- Load model ONCE ----------------
 
1
  import streamlit as st
2
  from merged import load_model_and_tokenizer, generate_code_stream
3
+ from code_analysis.pdf_utils import test_case
4
 
5
  st.write("πŸš€ App started")
6
  # ---------------- Load model ONCE ----------------
main.py β†’ pdf_utils.py RENAMED
File without changes
src/streamlit_app.py CHANGED
@@ -1,6 +1,6 @@
1
  import streamlit as st
2
  from merged import load_model_and_tokenizer, generate_code_stream
3
- from main import test_case
4
 
5
  st.write("πŸš€ App started")
6
  # ---------------- Load model ONCE ----------------
@@ -70,11 +70,12 @@ else:
70
  st.session_state.generated_code
71
  )
72
 
73
-
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")
 
1
  import streamlit as st
2
  from merged import load_model_and_tokenizer, generate_code_stream
3
+ from pdf_utils import test_case
4
 
5
  st.write("πŸš€ App started")
6
  # ---------------- Load model ONCE ----------------
 
70
  st.session_state.generated_code
71
  )
72
 
73
+
74
  else:
75
  st.warning("Please enter a task")
76
 
77
  st.divider()
78
+ st.write("PDF bytes length:", len(st.session_state.pdf_bytes))
79
 
80
  if st.session_state.get("pdf_bytes"):
81
  st.success("PDF ready")