BoghdadyJR commited on
Commit
8013dad
·
verified ·
1 Parent(s): 7ad0c80

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -31,7 +31,7 @@ llm = ChatGoogleGenerativeAI(
31
 
32
 
33
  def get_location_from_ip():
34
- ip = requests.get('https://api.ipify.org').text
35
  response = requests.get(f"https://ipapi.co/{ip}/json/").json()
36
  return {
37
  'city': response.get('city'),
 
31
 
32
 
33
  def get_location_from_ip():
34
+ ip =requests.get('https://api.ipify.org?format=json').json()['ip']
35
  response = requests.get(f"https://ipapi.co/{ip}/json/").json()
36
  return {
37
  'city': response.get('city'),