krrishkh12 commited on
Commit
c6acbfb
·
verified ·
1 Parent(s): 7b929a1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -1
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(data, ensure_ascii=False)
 
 
 
 
 
 
 
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)}"