LordFarquaad42 commited on
Commit
e53169e
·
verified ·
1 Parent(s): b1af435

added slider to let user determine how many samples to include

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -30,8 +30,10 @@ user_question: str = st.text_area("Enter your groovy questions here")
30
  remember_chat_history = st.toggle("Remember This Chat's History")
31
 
32
  temperature = st.slider(label="Creativity of Model", min_value=0.0, max_value=2.0, value=0.8)
 
33
 
34
- st.markdown("High creativity will make it go crazy - keep it low")
 
35
 
36
  access_key: str = st.text_input("Enter your gpt key here", type="password")
37
  st.markdown("*For more information about how to get an access key, read [this article](https://platform.openai.com/api-keys). Make sure it has money in it ☠️*", unsafe_allow_html=True)
@@ -49,7 +51,7 @@ if st.button('Start Scheming') & (access_key != "") & (user_question != ""):
49
  # Perform the Chromadb query.
50
  results = schemer.query(
51
  query_texts=[user_question],
52
- n_results=10,
53
  include = ['documents']
54
  )
55
  documents = results["documents"]
 
30
  remember_chat_history = st.toggle("Remember This Chat's History")
31
 
32
  temperature = st.slider(label="Creativity of Model", min_value=0.0, max_value=2.0, value=0.8)
33
+ st.markdown("*High creativity will make it go crazy - keep it low*")
34
 
35
+ num_samples = st.slider(label="Amount of References to Give to Model", min_value=10, max=100, value=10)
36
+ st.markdown("*High amount will make it slow and expensive (and may not be relevant) - keep it low*")
37
 
38
  access_key: str = st.text_input("Enter your gpt key here", type="password")
39
  st.markdown("*For more information about how to get an access key, read [this article](https://platform.openai.com/api-keys). Make sure it has money in it ☠️*", unsafe_allow_html=True)
 
51
  # Perform the Chromadb query.
52
  results = schemer.query(
53
  query_texts=[user_question],
54
+ n_results=num_samples,
55
  include = ['documents']
56
  )
57
  documents = results["documents"]