awacke1 commited on
Commit
398367a
·
1 Parent(s): 9ee9b7d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -3
app.py CHANGED
@@ -28,8 +28,8 @@ from langchain.memory import ConversationBufferMemory
28
  from langchain.chains import ConversationalRetrievalChain
29
  from templates import css, bot_template, user_template
30
 
31
-
32
-
33
 
34
  def generate_filename(prompt, file_type):
35
  central = pytz.timezone('US/Central')
@@ -328,7 +328,6 @@ def main():
328
  with colupload:
329
  uploaded_file = st.file_uploader("Add a file for context:", type=["pdf", "xml", "json", "xlsx", "csv", "html", "htm", "md", "txt"])
330
 
331
- should_save = st.sidebar.checkbox("💾 Save")
332
 
333
  # Document section chat
334
 
 
28
  from langchain.chains import ConversationalRetrievalChain
29
  from templates import css, bot_template, user_template
30
 
31
+ # sidebar declares up front allow all other functions to see globalclass variable
32
+ should_save = st.sidebar.checkbox("💾 Save")
33
 
34
  def generate_filename(prompt, file_type):
35
  central = pytz.timezone('US/Central')
 
328
  with colupload:
329
  uploaded_file = st.file_uploader("Add a file for context:", type=["pdf", "xml", "json", "xlsx", "csv", "html", "htm", "md", "txt"])
330
 
 
331
 
332
  # Document section chat
333