DrishtiSharma commited on
Commit
3b2fd03
Β·
verified Β·
1 Parent(s): 94194c6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -43,11 +43,11 @@ llm_judge.verbose = True
43
  rag_llm.verbose = True
44
 
45
  # ----------------- PDF Selection (Upload or URL) -----------------
46
- st.sidebar.subheader("πŸ“‚ PDF Selection")
47
  pdf_source = st.radio("Choose a PDF source:", ["Upload a PDF file", "Enter a PDF URL"], index=0, horizontal=True)
48
 
49
  if pdf_source == "Upload a PDF file":
50
- uploaded_file = st.sidebar.file_uploader("Upload your PDF file", type=["pdf"])
51
  if uploaded_file:
52
  st.session_state.pdf_path = "temp.pdf"
53
  with open(st.session_state.pdf_path, "wb") as f:
@@ -57,7 +57,7 @@ if pdf_source == "Upload a PDF file":
57
  st.session_state.vector_created = False
58
 
59
  elif pdf_source == "Enter a PDF URL":
60
- pdf_url = st.sidebar.text_input("Enter PDF URL:")
61
  if pdf_url and not st.session_state.pdf_loaded:
62
  with st.spinner("πŸ”„ Downloading PDF..."):
63
  try:
 
43
  rag_llm.verbose = True
44
 
45
  # ----------------- PDF Selection (Upload or URL) -----------------
46
+ st.subheader("πŸ“‚ PDF Selection")
47
  pdf_source = st.radio("Choose a PDF source:", ["Upload a PDF file", "Enter a PDF URL"], index=0, horizontal=True)
48
 
49
  if pdf_source == "Upload a PDF file":
50
+ uploaded_file = st.file_uploader("Upload your PDF file", type=["pdf"])
51
  if uploaded_file:
52
  st.session_state.pdf_path = "temp.pdf"
53
  with open(st.session_state.pdf_path, "wb") as f:
 
57
  st.session_state.vector_created = False
58
 
59
  elif pdf_source == "Enter a PDF URL":
60
+ pdf_url = st.text_input("Enter PDF URL:")
61
  if pdf_url and not st.session_state.pdf_loaded:
62
  with st.spinner("πŸ”„ Downloading PDF..."):
63
  try: