nangelov commited on
Commit
256f87d
·
verified ·
1 Parent(s): 3018b1a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -4
app.py CHANGED
@@ -13,7 +13,6 @@ from huggingface_hub import login
13
  login(token = os.getenv('nangelov_hf_token'))
14
  FOOTBALL_DATA_TOKEN = os.getenv('football_data_token')
15
 
16
- @tool
17
  def get_Competition_Code(competition_name: str)-> str:
18
  """A tool that returns the competition code for a given competition name.
19
  Args:
@@ -42,13 +41,15 @@ def get_Competition_Code(competition_name: str)-> str:
42
  return None
43
 
44
  @tool
45
- def search_Competition_Matches_Results_By_Date(competition_code: str, match_date: date)-> dict:
46
- """A tool that search football match results for a given competition on a specified date.
47
  Args:
48
- competition_code: A string representing the code of the competition (for example: 'PL' for Premier League).
49
  match_date: A date representing the date for which to retrieve match results (format: YYYY-MM-DD).
50
  """
51
 
 
 
52
  date_str = match_date.isoformat() # converts date to 'YYYY-MM-DD'
53
 
54
  # Create the URL using an f-string
 
13
  login(token = os.getenv('nangelov_hf_token'))
14
  FOOTBALL_DATA_TOKEN = os.getenv('football_data_token')
15
 
 
16
  def get_Competition_Code(competition_name: str)-> str:
17
  """A tool that returns the competition code for a given competition name.
18
  Args:
 
41
  return None
42
 
43
  @tool
44
+ def search_Competition_Matches_Results_By_Date(competition_name: str, match_date: date)-> dict:
45
+ """A tool that fetch football games results for a given competition from a specified date.
46
  Args:
47
+ competition_name: A string representing the full name of the competition, e.g., "Premier League" or "Bundesliga".
48
  match_date: A date representing the date for which to retrieve match results (format: YYYY-MM-DD).
49
  """
50
 
51
+ competition_code = get_Competition_Code(competition_name)
52
+
53
  date_str = match_date.isoformat() # converts date to 'YYYY-MM-DD'
54
 
55
  # Create the URL using an f-string