Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -39,10 +39,13 @@ def get_text():
|
|
39 |
|
40 |
if 'key' not in st.session_state:
|
41 |
st.session_state['key'] = st.text_input("key: ", key="input1")
|
42 |
-
|
43 |
-
user_input = get_text()
|
44 |
|
45 |
-
if
|
|
|
|
|
|
|
|
|
|
|
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']):
|
|
|
39 |
|
40 |
if 'key' not in st.session_state:
|
41 |
st.session_state['key'] = st.text_input("key: ", key="input1")
|
|
|
|
|
42 |
|
43 |
+
if st.session_state['key'] == st.secrets["login_key"]:
|
44 |
+
user_input = get_text()
|
45 |
+
else:
|
46 |
+
st.warning('wrong key!')
|
47 |
+
|
48 |
+
if user_input:
|
49 |
prompt = 'The following is a conversation with an AI assistant. The assistant is helpful, creative, clever, and very friendly.'
|
50 |
if st.session_state['generated']:
|
51 |
for past, generated in zip(st.session_state['past'], st.session_state['generated']):
|