Spaces:
Runtime error
Runtime error
app updated
Browse files
app.py
CHANGED
|
@@ -44,7 +44,8 @@ st.sidebar.markdown(
|
|
| 44 |
st.sidebar.success(
|
| 45 |
"Please enter a distance threshold (we advise to set it around 0.2)."
|
| 46 |
)
|
| 47 |
-
|
|
|
|
| 48 |
special_threshold = st.sidebar.number_input(
|
| 49 |
"Insert a number", value=0.2, placeholder="Type a number..."
|
| 50 |
) # 0.3
|
|
@@ -101,7 +102,7 @@ if prompt := st.chat_input("Tell me about YSA"):
|
|
| 101 |
st.session_state.messages.append({"role": "user", "content": prompt})
|
| 102 |
|
| 103 |
question = prompt
|
| 104 |
-
with st.spinner("
|
| 105 |
results = collection.query(query_texts=question, n_results=5)
|
| 106 |
idx = results["ids"][0]
|
| 107 |
idx = [int(i) for i in idx]
|
|
|
|
| 44 |
st.sidebar.success(
|
| 45 |
"Please enter a distance threshold (we advise to set it around 0.2)."
|
| 46 |
)
|
| 47 |
+
st.sidebar.warning("Select a website first!")
|
| 48 |
+
option = st.sidebar.selectbox("Which website do you want to ask?", ("YSA", "Larkin"))
|
| 49 |
special_threshold = st.sidebar.number_input(
|
| 50 |
"Insert a number", value=0.2, placeholder="Type a number..."
|
| 51 |
) # 0.3
|
|
|
|
| 102 |
st.session_state.messages.append({"role": "user", "content": prompt})
|
| 103 |
|
| 104 |
question = prompt
|
| 105 |
+
with st.spinner("Thinking ..."):
|
| 106 |
results = collection.query(query_texts=question, n_results=5)
|
| 107 |
idx = results["ids"][0]
|
| 108 |
idx = [int(i) for i in idx]
|