ZoeDuan commited on
Commit
8b698a2
Β·
verified Β·
1 Parent(s): 61ad6a0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -8
app.py CHANGED
@@ -8,15 +8,12 @@ st.set_page_config(page_title="πŸ¦™πŸ’¬ Llama 2 Chatbot")
8
  # Replicate Credentials
9
  with st.sidebar:
10
  st.title('πŸ¦™πŸ’¬ Llama 2 Chatbot')
11
- if 'REPLICATE_API_TOKEN' in st.secrets:
12
- st.success('API key already provided!', icon='βœ…')
13
- replicate_api = st.secrets['REPLICATE_API_TOKEN']
 
14
  else:
15
- replicate_api = st.text_input('Enter Replicate API token:', type='password')
16
- if not (replicate_api.startswith('r8_') and len(replicate_api)==40):
17
- st.warning('Please enter your credentials!', icon='⚠️')
18
- else:
19
- st.success('Proceed to entering your prompt message!', icon='πŸ‘‰')
20
  os.environ['REPLICATE_API_TOKEN'] = replicate_api
21
 
22
  st.subheader('Models and parameters')
 
8
  # Replicate Credentials
9
  with st.sidebar:
10
  st.title('πŸ¦™πŸ’¬ Llama 2 Chatbot')
11
+
12
+ replicate_api = st.text_input('Enter Replicate API token:', type='password')
13
+ if not (replicate_api.startswith('r8_') and len(replicate_api)==40):
14
+ st.warning('Please enter your credentials!', icon='⚠️')
15
  else:
16
+ st.success('Proceed to entering your prompt message!', icon='πŸ‘‰')
 
 
 
 
17
  os.environ['REPLICATE_API_TOKEN'] = replicate_api
18
 
19
  st.subheader('Models and parameters')