Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -148,7 +148,7 @@ def get_date_panchang(date: str = None, data_language: str = "EN") -> str:
|
|
| 148 |
|
| 149 |
|
| 150 |
@tool
|
| 151 |
-
def get_holidays(year: int = None) -> str:
|
| 152 |
"""
|
| 153 |
Fetches government and popular holidays for a given year from ExaWeb API.
|
| 154 |
Does not include Panchang events like Ekadashi.
|
|
@@ -160,8 +160,8 @@ def get_holidays(year: int = None) -> str:
|
|
| 160 |
year = datetime.datetime.now().year
|
| 161 |
|
| 162 |
params = {
|
| 163 |
-
"app_language":
|
| 164 |
-
"data_language":
|
| 165 |
"year": year
|
| 166 |
}
|
| 167 |
headers = {
|
|
@@ -169,7 +169,7 @@ def get_holidays(year: int = None) -> str:
|
|
| 169 |
}
|
| 170 |
|
| 171 |
try:
|
| 172 |
-
response = requests.get("https://api.exaweb.in:3004/api/panchang/holiday", params=params)
|
| 173 |
response.raise_for_status()
|
| 174 |
data = response.json()
|
| 175 |
|
|
|
|
| 148 |
|
| 149 |
|
| 150 |
@tool
|
| 151 |
+
def get_holidays(year: int = None, app_language: str = "EN", data_language: str = "HI") -> str:
|
| 152 |
"""
|
| 153 |
Fetches government and popular holidays for a given year from ExaWeb API.
|
| 154 |
Does not include Panchang events like Ekadashi.
|
|
|
|
| 160 |
year = datetime.datetime.now().year
|
| 161 |
|
| 162 |
params = {
|
| 163 |
+
"app_language": app_language,
|
| 164 |
+
"data_language": data_language,
|
| 165 |
"year": year
|
| 166 |
}
|
| 167 |
headers = {
|
|
|
|
| 169 |
}
|
| 170 |
|
| 171 |
try:
|
| 172 |
+
response = requests.get("https://api.exaweb.in:3004/api/panchang/holiday", params=params, headers)
|
| 173 |
response.raise_for_status()
|
| 174 |
data = response.json()
|
| 175 |
|