Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
@@ -316,6 +316,11 @@ def generate_answer(message, choice, retrieval_mode):
|
|
316 |
if "restaurant" in message.lower() and "birmingham" in message.lower():
|
317 |
response = fetch_yelp_restaurants()
|
318 |
return response, extract_addresses(response)
|
|
|
|
|
|
|
|
|
|
|
319 |
|
320 |
prompt_template = QA_CHAIN_PROMPT_1 if choice == "Details" else QA_CHAIN_PROMPT_2
|
321 |
|
@@ -339,6 +344,8 @@ def generate_answer(message, choice, retrieval_mode):
|
|
339 |
|
340 |
|
341 |
|
|
|
|
|
342 |
def bot(history, choice, tts_choice, retrieval_mode):
|
343 |
if not history:
|
344 |
return history
|
@@ -970,7 +977,6 @@ from serpapi.google_search import GoogleSearch
|
|
970 |
from datetime import datetime, timedelta
|
971 |
|
972 |
def fetch_google_hotels():
|
973 |
-
|
974 |
import os
|
975 |
|
976 |
params = {
|
|
|
316 |
if "restaurant" in message.lower() and "birmingham" in message.lower():
|
317 |
response = fetch_yelp_restaurants()
|
318 |
return response, extract_addresses(response)
|
319 |
+
|
320 |
+
# Check if the question is about hotels
|
321 |
+
if "hotel" in message.lower() and "birmingham" in message.lower():
|
322 |
+
response = fetch_google_hotels()
|
323 |
+
return response, extract_addresses(response)
|
324 |
|
325 |
prompt_template = QA_CHAIN_PROMPT_1 if choice == "Details" else QA_CHAIN_PROMPT_2
|
326 |
|
|
|
344 |
|
345 |
|
346 |
|
347 |
+
|
348 |
+
|
349 |
def bot(history, choice, tts_choice, retrieval_mode):
|
350 |
if not history:
|
351 |
return history
|
|
|
977 |
from datetime import datetime, timedelta
|
978 |
|
979 |
def fetch_google_hotels():
|
|
|
980 |
import os
|
981 |
|
982 |
params = {
|