Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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.
|
| 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:
|