Kaludi commited on
Commit
ee05990
1 Parent(s): 4b8fbf1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -10,7 +10,7 @@ if "history" not in st.session_state:
10
 
11
  st.sidebar.markdown("## Configuration")
12
  KEY = st.sidebar.text_input("Enter your OpenAI API key")
13
- models = ['text-davinci-003', 'text-curie-001 (WIP)', 'text-babbage-001 (WIP)', 'text-ada-001 (WIP)']
14
  model = st.sidebar.selectbox("Select a model", models, index=0)
15
 
16
  temperature = st.sidebar.slider("Temperature", 0.0, 1.0, 0.7)
@@ -51,7 +51,7 @@ def generate_answer(prompt):
51
  st.session_state.history.append({"message": prompt, "is_user": True})
52
  st.session_state.history.append({"message": message_bot, "is_user": False})
53
  else:
54
- st.error("An error occurred while processing the API response.")
55
 
56
  prompt = st.text_input("Prompt")
57
  if st.button("Submit"):
 
10
 
11
  st.sidebar.markdown("## Configuration")
12
  KEY = st.sidebar.text_input("Enter your OpenAI API key")
13
+ models = ['text-davinci-003', 'text-curie-001', 'text-babbage-001', 'text-ada-001']
14
  model = st.sidebar.selectbox("Select a model", models, index=0)
15
 
16
  temperature = st.sidebar.slider("Temperature", 0.0, 1.0, 0.7)
 
51
  st.session_state.history.append({"message": prompt, "is_user": True})
52
  st.session_state.history.append({"message": message_bot, "is_user": False})
53
  else:
54
+ st.error("An error occurred while processing the API response. If using a model other than text-davinci-003, then lower the Max Tokens.")
55
 
56
  prompt = st.text_input("Prompt")
57
  if st.button("Submit"):