aquibmoin commited on
Commit
8c7f129
β€’
1 Parent(s): 5f35869

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -3
app.py CHANGED
@@ -3,11 +3,11 @@ import replicate
3
  import os
4
 
5
  # App title
6
- st.set_page_config(page_title="πŸ¦™πŸ’¬ Llama 2 Chatbot")
7
 
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']
@@ -20,11 +20,13 @@ with st.sidebar:
20
  os.environ['REPLICATE_API_TOKEN'] = replicate_api
21
 
22
  st.subheader('Models and parameters')
23
- selected_model = st.sidebar.selectbox('Choose a Llama2 model', ['Llama2-7B', 'Llama2-13B'], key='selected_model')
24
  if selected_model == 'Llama2-7B':
25
  llm = 'meta/llama-2-7b-chat'
26
  elif selected_model == 'Llama2-13B':
27
  llm = 'meta/llama-2-13b-chat'
 
 
28
  temperature = st.sidebar.slider('temperature', min_value=0.01, max_value=1.0, value=0.1, step=0.01)
29
  top_p = st.sidebar.slider('top_p', min_value=0.01, max_value=1.0, value=0.9, step=0.01)
30
  max_length = st.sidebar.slider('max_length', min_value=32, max_value=1000, value=400, step=8)
 
3
  import os
4
 
5
  # App title
6
+ st.set_page_config(page_title="πŸ¦™πŸ’¬ Meta Llama Inference")
7
 
8
  # Replicate Credentials
9
  with st.sidebar:
10
+ st.title('πŸ¦™πŸ’¬ Meta Llama Inference')
11
  if 'REPLICATE_API_TOKEN' in st.secrets:
12
  st.success('API key already provided!', icon='βœ…')
13
  replicate_api = st.secrets['REPLICATE_API_TOKEN']
 
20
  os.environ['REPLICATE_API_TOKEN'] = replicate_api
21
 
22
  st.subheader('Models and parameters')
23
+ selected_model = st.sidebar.selectbox('Choose a Meta Llama model', ['Llama2-7B', 'Llama2-13B', 'Llama3-8B-Instruct'], key='selected_model')
24
  if selected_model == 'Llama2-7B':
25
  llm = 'meta/llama-2-7b-chat'
26
  elif selected_model == 'Llama2-13B':
27
  llm = 'meta/llama-2-13b-chat'
28
+ elif selected_model == 'Llama3-8B-Instruct':
29
+ llm = 'meta/meta-llama-3-8b-instruct'
30
  temperature = st.sidebar.slider('temperature', min_value=0.01, max_value=1.0, value=0.1, step=0.01)
31
  top_p = st.sidebar.slider('top_p', min_value=0.01, max_value=1.0, value=0.9, step=0.01)
32
  max_length = st.sidebar.slider('max_length', min_value=32, max_value=1000, value=400, step=8)