Pijush2023 commited on
Commit
b4b2728
·
verified ·
1 Parent(s): 1105c96

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -0
app.py CHANGED
@@ -45,6 +45,9 @@ from langchain_core.output_parsers import StrOutputParser
45
  from langchain_core.runnables import RunnableBranch, RunnableLambda, RunnableParallel, RunnablePassthrough
46
  from serpapi.google_search import GoogleSearch
47
 
 
 
 
48
  # Set environment variables for CUDA
49
  os.environ['PYTORCH_USE_CUDA_DSA'] = '1'
50
  os.environ['CUDA_LAUNCH_BLOCKING'] = '1'
@@ -1008,6 +1011,7 @@ def fetch_yelp_restaurants():
1008
  link = result.get("link", "#")
1009
 
1010
  response_text += format_restaurant_hotel_info(name, link, location, phone, rating, reviews, snippet)
 
1011
 
1012
  return response_text
1013
 
@@ -1074,6 +1078,7 @@ def fetch_google_hotels(query="Birmingham Hotel", check_in="2024-08-14", check_o
1074
  check_out_time,
1075
  amenities
1076
  )
 
1077
 
1078
  return hotel_info
1079
 
@@ -1132,6 +1137,7 @@ def fetch_google_flights(departure_id="JFK", arrival_id="BHM", outbound_date="20
1132
  duration=duration,
1133
  airplane=airplane
1134
  )
 
1135
 
1136
  return flight_info
1137
 
 
45
  from langchain_core.runnables import RunnableBranch, RunnableLambda, RunnableParallel, RunnablePassthrough
46
  from serpapi.google_search import GoogleSearch
47
 
48
+
49
+
50
+
51
  # Set environment variables for CUDA
52
  os.environ['PYTORCH_USE_CUDA_DSA'] = '1'
53
  os.environ['CUDA_LAUNCH_BLOCKING'] = '1'
 
1011
  link = result.get("link", "#")
1012
 
1013
  response_text += format_restaurant_hotel_info(name, link, location, phone, rating, reviews, snippet)
1014
+
1015
 
1016
  return response_text
1017
 
 
1078
  check_out_time,
1079
  amenities
1080
  )
1081
+
1082
 
1083
  return hotel_info
1084
 
 
1137
  duration=duration,
1138
  airplane=airplane
1139
  )
1140
+
1141
 
1142
  return flight_info
1143