jableable commited on
Commit
73cf8d9
1 Parent(s): d81c920

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -4,6 +4,7 @@ import numpy as np
4
  from PIL import Image
5
  import io
6
  import urllib.request
 
7
  st.set_page_config(layout="wide")
8
 
9
 
@@ -83,7 +84,8 @@ with col2:
83
  if state.coords_submitted:
84
  state.coords_submitted = False
85
  try:
86
- url = "https://maps.googleapis.com/maps/api/staticmap?center="+str(state.lat)+","+str(state.lng)+"&zoom=16&size=640x640&maptype=satellite&key=AIzaSyCzzVb_qf0TQgLw3K2y5EE6geyzE6KzQuA"
 
87
  buffer = io.BytesIO(urllib.request.urlopen(url).read())
88
  state.img = Image.open(buffer).convert("RGB")
89
  except Exception as e:
 
4
  from PIL import Image
5
  import io
6
  import urllib.request
7
+ import os
8
  st.set_page_config(layout="wide")
9
 
10
 
 
84
  if state.coords_submitted:
85
  state.coords_submitted = False
86
  try:
87
+ api_key = os.getenv("goog_api")
88
+ url = "https://maps.googleapis.com/maps/api/staticmap?center="+str(state.lat)+","+str(state.lng)+"&zoom=16&size=640x640&maptype=satellite&key="+api_key
89
  buffer = io.BytesIO(urllib.request.urlopen(url).read())
90
  state.img = Image.open(buffer).convert("RGB")
91
  except Exception as e: