Pijush2023 commited on
Commit
9a90b7a
·
verified ·
1 Parent(s): de6cb94

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -355,7 +355,7 @@ def generate_map(location_names):
355
  api_key = os.environ['GOOGLEMAPS_API_KEY']
356
  gmaps = GoogleMapsClient(key=api_key)
357
 
358
- m = folium.Map(location=[33.5175, -86.809444], zoom_start=20)
359
 
360
  for location_name in all_addresses:
361
  geocode_result = gmaps.geocode(location_name)
@@ -702,7 +702,7 @@ with gr.Blocks(theme='Pijush2023/scikit-learn-pijush') as demo:
702
  location_output = gr.HTML()
703
  bot_msg.then(show_map_if_details, [chatbot, choice], [location_output, location_output], api_name="map_finder")
704
 
705
- demo.load(Javascript("document.addEventListener('keydown', function(event) { if (event.key === 'Enter') { event.preventDefault(); } });"))
706
 
707
  demo.queue()
708
  demo.launch(share=True)
 
355
  api_key = os.environ['GOOGLEMAPS_API_KEY']
356
  gmaps = GoogleMapsClient(key=api_key)
357
 
358
+ m = folium.Map(location=[33.5175, -86.809444], zoom_start=12)
359
 
360
  for location_name in all_addresses:
361
  geocode_result = gmaps.geocode(location_name)
 
702
  location_output = gr.HTML()
703
  bot_msg.then(show_map_if_details, [chatbot, choice], [location_output, location_output], api_name="map_finder")
704
 
705
+ demo.load(gr.HTML("<script>document.addEventListener('keydown', function(event) { if (event.key === 'Enter') { event.preventDefault(); } });</script>"))
706
 
707
  demo.queue()
708
  demo.launch(share=True)