Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -72,9 +72,9 @@ st.subheader('Upload paper in pdf format')
|
|
72 |
# for summ in summ_text:
|
73 |
# st.write(summ)
|
74 |
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
|
79 |
# Function to render HTML content
|
80 |
def render_html(text):
|
@@ -93,6 +93,9 @@ if 'page_index' not in st.session_state:
|
|
93 |
if 'current_text' not in st.session_state:
|
94 |
st.session_state.current_text = summ_text[st.session_state.page_index]
|
95 |
|
|
|
|
|
|
|
96 |
# Function to handle page turn
|
97 |
def turn_page(direction):
|
98 |
if direction == "next" and st.session_state.page_index < len(summ_text) - 1:
|
|
|
72 |
# for summ in summ_text:
|
73 |
# st.write(summ)
|
74 |
|
75 |
+
|
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):
|
|
|
93 |
if 'current_text' not in st.session_state:
|
94 |
st.session_state.current_text = summ_text[st.session_state.page_index]
|
95 |
|
96 |
+
if 'summ_text' not in st.session_state:
|
97 |
+
st.session_state.summ_text = summ_text
|
98 |
+
|
99 |
# Function to handle page turn
|
100 |
def turn_page(direction):
|
101 |
if direction == "next" and st.session_state.page_index < len(summ_text) - 1:
|