Spaces:
Running
Running
Commit
·
1ef9098
1
Parent(s):
ce5740f
Fixed citation print
Browse files
app.py
CHANGED
@@ -10,7 +10,7 @@ import shutil
|
|
10 |
|
11 |
import pickle
|
12 |
docs = None
|
13 |
-
api_key = ''
|
14 |
|
15 |
#title
|
16 |
st.title("Encode knowledge from papers with cited references")
|
@@ -120,7 +120,8 @@ def download_pdf(pdf_info):
|
|
120 |
time.sleep(0.15)
|
121 |
all_reference_text.append(f"{i+1}. {pdf_citation}\n")
|
122 |
if 'all_reference_text' not in st.session_state:
|
123 |
-
st.session_state
|
|
|
124 |
|
125 |
# print(all_reference_text)
|
126 |
|
@@ -155,7 +156,8 @@ if searchButton:
|
|
155 |
global pdf_info
|
156 |
pdf_info = search_click_callback(search_query, max_results)
|
157 |
if 'pdf_info' not in st.session_state:
|
158 |
-
st.session_state
|
|
|
159 |
# print(f'This is PDF info from search:{pdf_info}')
|
160 |
|
161 |
|
|
|
10 |
|
11 |
import pickle
|
12 |
docs = None
|
13 |
+
api_key = ' '
|
14 |
|
15 |
#title
|
16 |
st.title("Encode knowledge from papers with cited references")
|
|
|
120 |
time.sleep(0.15)
|
121 |
all_reference_text.append(f"{i+1}. {pdf_citation}\n")
|
122 |
if 'all_reference_text' not in st.session_state:
|
123 |
+
st.session_state.key = 'all_reference_text'
|
124 |
+
st.session_state['all_reference_text'] = ' '.join(all_reference_text)
|
125 |
|
126 |
# print(all_reference_text)
|
127 |
|
|
|
156 |
global pdf_info
|
157 |
pdf_info = search_click_callback(search_query, max_results)
|
158 |
if 'pdf_info' not in st.session_state:
|
159 |
+
st.session_state.key = 'pdf_info'
|
160 |
+
st.session_state['pdf_info'] = pdf_info
|
161 |
# print(f'This is PDF info from search:{pdf_info}')
|
162 |
|
163 |
|