Kaludi commited on
Commit
5bc9297
·
1 Parent(s): 4c9e4a1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -9,8 +9,8 @@ if "history" not in st.session_state:
9
  st.session_state.history = []
10
 
11
  st.sidebar.markdown("## Configuration")
12
- API_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)
@@ -26,7 +26,7 @@ st.sidebar.markdown("text-babbage-001 | 2,048 max tokens")
26
  st.sidebar.markdown("text-ada-001 | 2,048 max tokens")
27
 
28
  def generate_answer(prompt):
29
- API_KEY = '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'
30
  API_URL = "https://api.openai.com/v1/completions"
31
  headers = {
32
  'Content-Type': 'application/json',
 
9
  st.session_state.history = []
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)
 
26
  st.sidebar.markdown("text-ada-001 | 2,048 max tokens")
27
 
28
  def generate_answer(prompt):
29
+ API_KEY = KEY
30
  API_URL = "https://api.openai.com/v1/completions"
31
  headers = {
32
  'Content-Type': 'application/json',