Spaces:
Running
Running
changed text for 'rewrite query'
Browse files
app.py
CHANGED
@@ -434,8 +434,7 @@ def main():
|
|
434 |
|
435 |
with col1:
|
436 |
|
437 |
-
|
438 |
-
if use_reworded_query:
|
439 |
|
440 |
# let's use Llama2, and fall back on GPT3.5 if it fails
|
441 |
reworded_query = reword_query(query, guest,
|
@@ -448,8 +447,8 @@ def main():
|
|
448 |
# if the guest name is not in the rewritten question, we add it
|
449 |
new_query = f"About {guest}, " + new_query
|
450 |
|
451 |
-
|
452 |
-
st.write(f"
|
453 |
|
454 |
# we can arrive here only if a guest was selected
|
455 |
where_filter = WhereFilter(path=['guest'], operator='Equal', valueText=guest).todict() \
|
@@ -486,7 +485,6 @@ def main():
|
|
486 |
verbose=True)
|
487 |
# st.write(f"Number of results: {len(valid_response)}")
|
488 |
|
489 |
-
|
490 |
# I jump out of col1 to get all page width, so need to retest query
|
491 |
if query:
|
492 |
|
|
|
434 |
|
435 |
with col1:
|
436 |
|
437 |
+
if st.toggle('Rewrite query with LLM', True):
|
|
|
438 |
|
439 |
# let's use Llama2, and fall back on GPT3.5 if it fails
|
440 |
reworded_query = reword_query(query, guest,
|
|
|
447 |
# if the guest name is not in the rewritten question, we add it
|
448 |
new_query = f"About {guest}, " + new_query
|
449 |
|
450 |
+
query = new_query
|
451 |
+
st.write(f"New query: {query}")
|
452 |
|
453 |
# we can arrive here only if a guest was selected
|
454 |
where_filter = WhereFilter(path=['guest'], operator='Equal', valueText=guest).todict() \
|
|
|
485 |
verbose=True)
|
486 |
# st.write(f"Number of results: {len(valid_response)}")
|
487 |
|
|
|
488 |
# I jump out of col1 to get all page width, so need to retest query
|
489 |
if query:
|
490 |
|