com3dian commited on
Commit
55f8769
·
verified ·
1 Parent(s): 312b574

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -3
app.py CHANGED
@@ -76,9 +76,6 @@ st.subheader('Upload paper in pdf format')
76
  with open('slides_text.pkl', 'rb') as file:
77
  summ_text = pickle.load(file)
78
 
79
- # Example summary text list (replace with your actual list)
80
- summ_text = ["First page text.", "Second page text.", "Third page text."]
81
-
82
  # Function to render HTML content
83
  def render_html(text):
84
  # Split text by periods
@@ -97,6 +94,7 @@ if 'current_text' not in st.session_state:
97
 
98
  # Function to handle page turn
99
  def turn_page(direction):
 
100
  if direction == "next" and st.session_state.page_index < len(summ_text) - 1:
101
  st.session_state.page_index += 1
102
  elif direction == "prev" and st.session_state.page_index > 0:
 
76
  with open('slides_text.pkl', 'rb') as file:
77
  summ_text = pickle.load(file)
78
 
 
 
 
79
  # Function to render HTML content
80
  def render_html(text):
81
  # Split text by periods
 
94
 
95
  # Function to handle page turn
96
  def turn_page(direction):
97
+ summ_text[st.session_state.page_index] = st.session_state.current_text
98
  if direction == "next" and st.session_state.page_index < len(summ_text) - 1:
99
  st.session_state.page_index += 1
100
  elif direction == "prev" and st.session_state.page_index > 0: