Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -121,7 +121,14 @@ def get_date_panchang(date: str = None, data_language: str = "EN") -> str:
|
|
| 121 |
if not data or not isinstance(data, dict):
|
| 122 |
return "Empty or unexpected response."
|
| 123 |
|
| 124 |
-
return json.dumps(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 125 |
|
| 126 |
except Exception as e:
|
| 127 |
return f" Failed to fetch Panchang for {api_date}: {str(e)}"
|
|
|
|
| 121 |
if not data or not isinstance(data, dict):
|
| 122 |
return "Empty or unexpected response."
|
| 123 |
|
| 124 |
+
return json.dumps({
|
| 125 |
+
"date": data.get("date"),
|
| 126 |
+
"Sunrise": data.get("Sunrise"),
|
| 127 |
+
"Sunset": data.get("Sunset"),
|
| 128 |
+
"Tithi": data.get("Tithi"),
|
| 129 |
+
"Festivals": data.get("festivals"),
|
| 130 |
+
})
|
| 131 |
+
|
| 132 |
|
| 133 |
except Exception as e:
|
| 134 |
return f" Failed to fetch Panchang for {api_date}: {str(e)}"
|