Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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
|
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"):
|