sasan commited on
Commit
ba16989
1 Parent(s): e0e3529

chore: Update keepalive interval to 100 seconds

Browse files
Files changed (3) hide show
  1. kitt/keepalive.py +1 -1
  2. kitt/skills/weather.py +4 -1
  3. main.py +2 -1
kitt/keepalive.py CHANGED
@@ -34,7 +34,7 @@ def job():
34
  run_replicate_model()
35
 
36
 
37
- schedule.every(120).seconds.do(job)
38
 
39
  logger.info("Keepalive started.")
40
 
 
34
  run_replicate_model()
35
 
36
 
37
+ schedule.every(100).seconds.do(job)
38
 
39
  logger.info("Keepalive started.")
40
 
kitt/skills/weather.py CHANGED
@@ -67,7 +67,10 @@ def get_weather(location: str = "here"):
67
  # Formulate the sentences - {region}, {country}
68
  weather_sentences = (
69
  f"The current weather in {location} is {condition_text} "
70
- f"with a temperature of {temperature_c} C that feels like {feelslike_c} C. "
 
 
 
71
  # f"Humidity is at {humidity}%. "
72
  # f"Wind speed is {wind_kph} kph." if 'wind_kph' in weather_data['current'] else ""
73
  )
 
67
  # Formulate the sentences - {region}, {country}
68
  weather_sentences = (
69
  f"The current weather in {location} is {condition_text} "
70
+ f"with a temperature of {temperature_c} degrees C"
71
+ f" that feels like {feelslike_c} degrees C."
72
+ if feelslike_c != temperature_c
73
+ else ""
74
  # f"Humidity is at {humidity}%. "
75
  # f"Wind speed is {wind_kph} kph." if 'wind_kph' in weather_data['current'] else ""
76
  )
main.py CHANGED
@@ -151,7 +151,7 @@ tools = [
151
  ]
152
 
153
  functions = [
154
- set_vehicle_speed,
155
  set_vehicle_destination,
156
  get_weather,
157
  find_route,
@@ -276,6 +276,7 @@ def run_model(query, voice_character, state):
276
  def calculate_route_gradio(origin, destination):
277
  _, points = calculate_route(origin, destination)
278
  plot = kitt_utils.plot_route(points, vehicle=vehicle.location_coordinates)
 
279
  global_context["route_points"] = points
280
  # state.value["route_points"] = points
281
  vehicle.location_coordinates = points[0]["latitude"], points[0]["longitude"]
 
151
  ]
152
 
153
  functions = [
154
+ # set_vehicle_speed,
155
  set_vehicle_destination,
156
  get_weather,
157
  find_route,
 
276
  def calculate_route_gradio(origin, destination):
277
  _, points = calculate_route(origin, destination)
278
  plot = kitt_utils.plot_route(points, vehicle=vehicle.location_coordinates)
279
+ global_context["map"] = plot
280
  global_context["route_points"] = points
281
  # state.value["route_points"] = points
282
  vehicle.location_coordinates = points[0]["latitude"], points[0]["longitude"]