aaronW commited on
Commit
93fdaa7
1 Parent(s): f6398ae

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -37,11 +37,12 @@ def get_text():
37
  input_text = st.text_input("You: ", key="input")
38
  return input_text
39
 
40
-
 
 
41
  user_input = get_text()
42
 
43
-
44
- if user_input:
45
  prompt = 'The following is a conversation with an AI assistant. The assistant is helpful, creative, clever, and very friendly.'
46
  if st.session_state['generated']:
47
  for past, generated in zip(st.session_state['past'], st.session_state['generated']):
 
37
  input_text = st.text_input("You: ", key="input")
38
  return input_text
39
 
40
+ if 'key' not in st.session_state:
41
+ st.session_state['key'] = st.text_input("key: ", key="input")
42
+
43
  user_input = get_text()
44
 
45
+ if user_input and st.session_state['key'] == st.secrets["login_key"]:
 
46
  prompt = 'The following is a conversation with an AI assistant. The assistant is helpful, creative, clever, and very friendly.'
47
  if st.session_state['generated']:
48
  for past, generated in zip(st.session_state['past'], st.session_state['generated']):