Update app.py
Browse files
app.py
CHANGED
@@ -218,11 +218,11 @@ def ask_question(question, temperature, top_p, repetition_penalty, web_search):
|
|
218 |
|
219 |
for attempt in range(max_attempts):
|
220 |
try:
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
|
227 |
if rephrased_query == original_query:
|
228 |
print("Warning: Query was not rephrased. Using original query for search.")
|
|
|
218 |
|
219 |
for attempt in range(max_attempts):
|
220 |
try:
|
221 |
+
if web_search:
|
222 |
+
original_query = question
|
223 |
+
rephrased_query = rephrase_for_search(original_query, model)
|
224 |
+
print(f"Original query: {original_query}")
|
225 |
+
print(f"Rephrased query: {rephrased_query}")
|
226 |
|
227 |
if rephrased_query == original_query:
|
228 |
print("Warning: Query was not rephrased. Using original query for search.")
|