Georges commited on
Commit
3279af5
·
1 Parent(s): 8e42896

Maybe fix env?

Browse files
Files changed (1) hide show
  1. src/app.py +3 -9
src/app.py CHANGED
@@ -43,22 +43,16 @@ def search_location(location_name) -> Optional[dict[str, float]]:
43
 
44
  headers = {"accept": "application/json"}
45
 
46
- pk_key=""
47
- with open("/run/secrets/pk_key") as f:
48
- pk_key = f.read()
49
-
50
- if pk_key == "":
51
- st.write("Secret_key is empty")
52
-
53
  params = {
54
- "key": os.getenv("PK_KEY"),
55
  "q": location_name,
56
  "format": "json"
57
  }
58
 
59
  response = requests.get(url, params=params, headers=headers)
60
 
61
- print(response)
 
62
 
63
  response_json = response.json()
64
  #st.write(response)
 
43
 
44
  headers = {"accept": "application/json"}
45
 
 
 
 
 
 
 
 
46
  params = {
47
+ "key": os.environ.get("pk_key"),
48
  "q": location_name,
49
  "format": "json"
50
  }
51
 
52
  response = requests.get(url, params=params, headers=headers)
53
 
54
+ st.write("DEBUG:")
55
+ st.write(str(response))
56
 
57
  response_json = response.json()
58
  #st.write(response)