venkat-srinivasan-nexusflow commited on
Commit
5a7c394
Β·
verified Β·
1 Parent(s): 0a16124

Update app.py

Browse files

Add in conditional when the user specifies no-op.

Files changed (1) hide show
  1. app.py +5 -1
app.py CHANGED
@@ -407,7 +407,11 @@ class RavenDemo(gr.Blocks):
407
 
408
  previous_num_calls += len(function_call_list)
409
 
410
- relevant_places = self.get_relevant_places(results)
 
 
 
 
411
  gmaps_html = self.get_gmaps_html(relevant_places[0])
412
  places_dropdown_choices = self.get_place_dropdown_choices(relevant_places)
413
  places_dropdown = gr.Dropdown(
 
407
 
408
  previous_num_calls += len(function_call_list)
409
 
410
+ try:
411
+ relevant_places = self.get_relevant_places(results)
412
+ except:
413
+ relevant_places = self.get_relevant_places([])
414
+
415
  gmaps_html = self.get_gmaps_html(relevant_places[0])
416
  places_dropdown_choices = self.get_place_dropdown_choices(relevant_places)
417
  places_dropdown = gr.Dropdown(