Spaces:
Sleeping
Sleeping
Upload 17 files (#3)
Browse files- Upload 17 files (af112b4b410657a496dd7a02b8d44e587e06940f)
app.py
CHANGED
@@ -77,7 +77,7 @@ with st.sidebar:
|
|
77 |
use_bm25 = st.checkbox("Use 2-Stage Retrieval (BM25)")
|
78 |
num_candidates = int(
|
79 |
st.number_input(
|
80 |
-
"Number of Candidates to Generate
|
81 |
25,
|
82 |
200,
|
83 |
step=25,
|
@@ -171,10 +171,7 @@ if ticker_year_quarter_tuples_list != []:
|
|
171 |
multi_doc_context = generate_multi_doc_context(context_group)
|
172 |
|
173 |
else:
|
174 |
-
|
175 |
-
indices = get_indices_bm25(data, None, None, None, num_candidates)
|
176 |
-
else:
|
177 |
-
indices = None
|
178 |
|
179 |
query_results = query_pinecone(
|
180 |
dense_query_embedding,
|
@@ -205,11 +202,11 @@ if decoder_model == "GPT-3.5 Turbo":
|
|
205 |
value="",
|
206 |
type="password",
|
207 |
)
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
|
214 |
if decoder_model == "Vicuna-7B":
|
215 |
with col2:
|
|
|
77 |
use_bm25 = st.checkbox("Use 2-Stage Retrieval (BM25)")
|
78 |
num_candidates = int(
|
79 |
st.number_input(
|
80 |
+
"Number of Candidates to Generate:",
|
81 |
25,
|
82 |
200,
|
83 |
step=25,
|
|
|
171 |
multi_doc_context = generate_multi_doc_context(context_group)
|
172 |
|
173 |
else:
|
174 |
+
indices = None
|
|
|
|
|
|
|
175 |
|
176 |
query_results = query_pinecone(
|
177 |
dense_query_embedding,
|
|
|
202 |
value="",
|
203 |
type="password",
|
204 |
)
|
205 |
+
gpt_submitted = st.form_submit_button("Submit")
|
206 |
+
if gpt_submitted:
|
207 |
+
api_key = save_key(openai_key)
|
208 |
+
openai.api_key = api_key
|
209 |
+
generated_text = gpt_turbo_model(edited_prompt)
|
210 |
|
211 |
if decoder_model == "Vicuna-7B":
|
212 |
with col2:
|