Spaces:
Sleeping
Sleeping
Expanded school_info to include other variables
Browse files
app.py
CHANGED
|
@@ -1,4 +1,4 @@
|
|
| 1 |
-
from smolagents import CodeAgent,DuckDuckGoSearchTool, HfApiModel,load_tool,tool
|
| 2 |
from bs4 import BeautifulSoup
|
| 3 |
import datetime
|
| 4 |
import requests
|
|
@@ -36,7 +36,6 @@ def get_top_ranked_team(division:str, gender:str)-> dict:
|
|
| 36 |
if response.status_code == 200:
|
| 37 |
data = response.json()
|
| 38 |
school_info = data.get("results", [{}])[0]
|
| 39 |
-
school_info = {k: school_info[k] for k in ["schoolName", "boardName", "schoolId"] if k in school_info}
|
| 40 |
return school_info
|
| 41 |
else:
|
| 42 |
return "Error: Unable to fetch the school information."
|
|
|
|
| 1 |
+
from smolagents import CodeAgent, DuckDuckGoSearchTool, HfApiModel,load_tool,tool
|
| 2 |
from bs4 import BeautifulSoup
|
| 3 |
import datetime
|
| 4 |
import requests
|
|
|
|
| 36 |
if response.status_code == 200:
|
| 37 |
data = response.json()
|
| 38 |
school_info = data.get("results", [{}])[0]
|
|
|
|
| 39 |
return school_info
|
| 40 |
else:
|
| 41 |
return "Error: Unable to fetch the school information."
|