ivyblossom commited on
Commit
3a66f67
·
1 Parent(s): e1c69a3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -49,10 +49,10 @@ def main():
49
 
50
  # Display context where the answer came from
51
  context_page_num = answer['start']
52
- context_text = pdf_text_with_pages[context_page_num - 1][1] # Adjust page number to 0-based index
53
  st.write("Context:")
54
- st.write(f"Page Number: {context_page_num}")
55
  st.write(context_text)
56
 
57
  if __name__ == "__main__":
58
- main()
 
49
 
50
  # Display context where the answer came from
51
  context_page_num = answer['start']
52
+ context_text = pdf_text_with_pages[context_page_num][1] # Use the page number directly (no need to adjust)
53
  st.write("Context:")
54
+ st.write(f"Page Number: {context_page_num + 1}") # Add 1 to convert to 1-based index for display
55
  st.write(context_text)
56
 
57
  if __name__ == "__main__":
58
+ main()