Spaces:
Build error
Build error
Upload app.py
Browse files
app.py
CHANGED
@@ -171,7 +171,7 @@ elif encoder_model == "SGPT":
|
|
171 |
retriever_model = get_sgpt_embedding_model()
|
172 |
|
173 |
|
174 |
-
window = int(st.number_input("Sentence Window Size",
|
175 |
|
176 |
threshold = float(
|
177 |
st.number_input(
|
@@ -185,7 +185,7 @@ query_results = query_pinecone(
|
|
185 |
query_text, num_results, retriever_model, pinecone_index, threshold
|
186 |
)
|
187 |
|
188 |
-
if threshold <= 0.
|
189 |
context_list = sentence_id_combine(data, query_results, lag=window)
|
190 |
else:
|
191 |
context_list = format_query(query_results)
|
|
|
171 |
retriever_model = get_sgpt_embedding_model()
|
172 |
|
173 |
|
174 |
+
window = int(st.number_input("Sentence Window Size", 0, 3, value=0))
|
175 |
|
176 |
threshold = float(
|
177 |
st.number_input(
|
|
|
185 |
query_text, num_results, retriever_model, pinecone_index, threshold
|
186 |
)
|
187 |
|
188 |
+
if threshold <= 0.60:
|
189 |
context_list = sentence_id_combine(data, query_results, lag=window)
|
190 |
else:
|
191 |
context_list = format_query(query_results)
|