Thatguyjk723 commited on
Commit
ebd202a
·
verified ·
1 Parent(s): 04563ae

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -2
app.py CHANGED
@@ -19,9 +19,8 @@ def get_name_age(name:str)-> str: #it's import to specify the return type
19
  # make a call to the agify api with the given name
20
  payload = {'name': name}
21
 
22
- res = requests.post('https://api.agify.io/', params=payload)
23
  data = res.json()
24
- print(data)
25
  age = data["age"]
26
 
27
  except Exception as e:
 
19
  # make a call to the agify api with the given name
20
  payload = {'name': name}
21
 
22
+ res = requests.get('https://api.agify.io/', params=payload)
23
  data = res.json()
 
24
  age = data["age"]
25
 
26
  except Exception as e: