Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,6 +1,7 @@
|
|
| 1 |
import gradio as gr
|
| 2 |
import requests
|
| 3 |
-
from datetime import datetime
|
|
|
|
| 4 |
|
| 5 |
# =========================
|
| 6 |
# 🔑 OpenWeather API Key
|
|
@@ -8,9 +9,455 @@ from datetime import datetime
|
|
| 8 |
API_KEY = "3a97c8c63350b72e8439c42e8d371b07"
|
| 9 |
|
| 10 |
# =========================
|
| 11 |
-
#
|
| 12 |
# =========================
|
| 13 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 14 |
if not city:
|
| 15 |
return """
|
| 16 |
<div style="text-align:center; padding:40px; color:#ff6b6b;">
|
|
@@ -18,18 +465,20 @@ def get_weather(city):
|
|
| 18 |
</div>
|
| 19 |
"""
|
| 20 |
|
| 21 |
-
#
|
|
|
|
|
|
|
|
|
|
| 22 |
city_query = city.strip()
|
| 23 |
url = f"http://api.openweathermap.org/data/2.5/weather?q={city_query}&appid={API_KEY}&units=metric"
|
| 24 |
|
| 25 |
try:
|
| 26 |
response = requests.get(url, timeout=10)
|
| 27 |
data = response.json()
|
| 28 |
-
except
|
| 29 |
return """
|
| 30 |
<div style="text-align:center; padding:40px; color:#ff6b6b;">
|
| 31 |
<h3>❌ Error connecting to OpenWeather API</h3>
|
| 32 |
-
<p>Please check your internet connection and try again.</p>
|
| 33 |
</div>
|
| 34 |
"""
|
| 35 |
|
|
@@ -37,32 +486,25 @@ def get_weather(city):
|
|
| 37 |
return f"""
|
| 38 |
<div style="text-align:center; padding:40px; color:#ff6b6b;">
|
| 39 |
<h3>🔍 City '{city_query}' not found!</h3>
|
| 40 |
-
<p>Please check the spelling and try again.</p>
|
| 41 |
</div>
|
| 42 |
"""
|
| 43 |
|
| 44 |
-
# Extract
|
| 45 |
temp = data["main"]["temp"]
|
| 46 |
feels_like = data["main"]["feels_like"]
|
| 47 |
-
temp_min = data["main"]["temp_min"]
|
| 48 |
-
temp_max = data["main"]["temp_max"]
|
| 49 |
humidity = data["main"]["humidity"]
|
| 50 |
-
pressure = data["main"]["pressure"]
|
| 51 |
description = data["weather"][0]["description"].title()
|
| 52 |
weather_main = data["weather"][0]["main"].lower()
|
| 53 |
wind_speed = data["wind"]["speed"]
|
| 54 |
-
clouds = data["clouds"]["all"]
|
| 55 |
country = data["sys"]["country"]
|
| 56 |
|
| 57 |
-
#
|
| 58 |
-
|
| 59 |
-
sunset = datetime.fromtimestamp(data["sys"]["sunset"]).strftime("%I:%M %p")
|
| 60 |
-
current_time = datetime.now().strftime("%I:%M %p, %B %d, %Y")
|
| 61 |
|
| 62 |
-
#
|
| 63 |
-
|
| 64 |
|
| 65 |
-
#
|
| 66 |
weather_gradients = {
|
| 67 |
"clear": "linear-gradient(135deg, #667eea 0%, #764ba2 100%)",
|
| 68 |
"clouds": "linear-gradient(135deg, #bdc3c7 0%, #2c3e50 100%)",
|
|
@@ -70,227 +512,174 @@ def get_weather(city):
|
|
| 70 |
"drizzle": "linear-gradient(135deg, #a8edea 0%, #fed6e3 100%)",
|
| 71 |
"thunderstorm": "linear-gradient(135deg, #4b6cb7 0%, #182848 100%)",
|
| 72 |
"snow": "linear-gradient(135deg, #e6dada 0%, #274046 100%)",
|
| 73 |
-
"mist": "linear-gradient(135deg, #cfd9df 0%, #e2ebf0 100%)",
|
| 74 |
-
"haze": "linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%)",
|
| 75 |
-
"smoke": "linear-gradient(135deg, #606c88 0%, #3f4c6b 100%)",
|
| 76 |
}
|
| 77 |
-
|
| 78 |
gradient = weather_gradients.get(weather_main, "linear-gradient(135deg, #667eea 0%, #764ba2 100%)")
|
| 79 |
|
| 80 |
-
#
|
| 81 |
weather_icons = {
|
| 82 |
"clear": "☀️",
|
| 83 |
"clouds": "☁️",
|
| 84 |
"rain": "🌧️",
|
| 85 |
-
"drizzle": "🌦️",
|
| 86 |
"thunderstorm": "⛈️",
|
| 87 |
"snow": "❄️",
|
| 88 |
"mist": "🌫️",
|
| 89 |
-
"haze": "🌫️",
|
| 90 |
-
"smoke": "💨",
|
| 91 |
-
"dust": "🌪️",
|
| 92 |
-
"fog": "🌁",
|
| 93 |
}
|
| 94 |
-
|
| 95 |
icon = weather_icons.get(weather_main, "🌤️")
|
| 96 |
|
| 97 |
-
#
|
| 98 |
-
|
| 99 |
<style>
|
| 100 |
-
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;700&display=swap');
|
| 101 |
-
|
| 102 |
-
@keyframes float {{
|
| 103 |
-
0%, 100% {{ transform: translateY(0px); }}
|
| 104 |
-
50% {{ transform: translateY(-20px); }}
|
| 105 |
-
}}
|
| 106 |
-
|
| 107 |
-
@keyframes pulse {{
|
| 108 |
-
0%, 100% {{ opacity: 1; }}
|
| 109 |
-
50% {{ opacity: 0.7; }}
|
| 110 |
-
}}
|
| 111 |
|
| 112 |
@keyframes fadeIn {{
|
| 113 |
-
from {{ opacity: 0; transform: translateY(
|
| 114 |
to {{ opacity: 1; transform: translateY(0); }}
|
| 115 |
}}
|
| 116 |
|
| 117 |
-
|
| 118 |
-
|
|
|
|
| 119 |
}}
|
| 120 |
|
| 121 |
-
.
|
| 122 |
-
animation:
|
| 123 |
-
font-
|
| 124 |
-
text-shadow: 0 0 30px rgba(255,255,255,0.5);
|
| 125 |
}}
|
| 126 |
|
| 127 |
-
.
|
| 128 |
-
background:
|
| 129 |
-
|
| 130 |
-
|
| 131 |
-
|
| 132 |
-
|
| 133 |
-
|
| 134 |
-
transition: all 0.3s ease;
|
| 135 |
}}
|
| 136 |
|
| 137 |
-
.
|
| 138 |
transform: translateY(-5px);
|
| 139 |
-
|
| 140 |
-
box-shadow: 0 10px 25px rgba(0,0,0,0.2);
|
| 141 |
}}
|
| 142 |
|
| 143 |
-
.ramzan-
|
| 144 |
animation: pulse 2s ease-in-out infinite;
|
| 145 |
}}
|
| 146 |
</style>
|
| 147 |
|
| 148 |
-
<div class="
|
| 149 |
-
background: {gradient};
|
| 150 |
-
border-radius: 30px;
|
| 151 |
-
padding: 40px;
|
| 152 |
-
max-width: 600px;
|
| 153 |
-
margin: 0 auto;
|
| 154 |
-
font-family: 'Poppins', sans-serif;
|
| 155 |
-
color: #fff;
|
| 156 |
-
box-shadow: 0 20px 60px rgba(0,0,0,0.3);
|
| 157 |
-
">
|
| 158 |
-
<!-- Header Section -->
|
| 159 |
-
<div style="text-align: center; margin-bottom: 30px;">
|
| 160 |
-
<div class="ramzan-decoration" style="font-size: 28px; margin-bottom: 10px;">
|
| 161 |
-
🌙 ✨ ⭐
|
| 162 |
-
</div>
|
| 163 |
-
<h1 style="font-size: 42px; font-weight: 700; margin: 10px 0; text-shadow: 2px 2px 4px rgba(0,0,0,0.3);">
|
| 164 |
-
{city_query.title()}, {country}
|
| 165 |
-
</h1>
|
| 166 |
-
<p style="font-size: 16px; opacity: 0.9; margin: 5px 0;">
|
| 167 |
-
{current_time}
|
| 168 |
-
</p>
|
| 169 |
-
</div>
|
| 170 |
|
| 171 |
-
<!--
|
| 172 |
-
<div style="text-align: center;
|
| 173 |
-
<
|
| 174 |
-
<
|
| 175 |
-
|
| 176 |
-
</h2>
|
| 177 |
-
<p style="font-size: 28px; font-weight: 300; margin: 10px 0; text-transform: capitalize;">
|
| 178 |
-
{description}
|
| 179 |
-
</p>
|
| 180 |
-
<p style="font-size: 20px; opacity: 0.9;">
|
| 181 |
-
Feels like {feels_like:.1f}°C
|
| 182 |
-
</p>
|
| 183 |
</div>
|
| 184 |
|
| 185 |
-
<!--
|
| 186 |
-
<div style="
|
| 187 |
-
<
|
| 188 |
-
|
| 189 |
-
|
| 190 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 191 |
</div>
|
| 192 |
</div>
|
| 193 |
|
| 194 |
-
<!-- Weather
|
| 195 |
-
<div
|
| 196 |
-
<
|
| 197 |
-
|
| 198 |
-
<div style="font-size:
|
| 199 |
-
<
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 200 |
</div>
|
| 201 |
-
|
| 202 |
-
|
| 203 |
-
|
| 204 |
-
|
| 205 |
-
|
| 206 |
-
<
|
| 207 |
-
|
| 208 |
-
<div class="stat-card">
|
| 209 |
-
<div style="font-size: 32px; margin-bottom: 8px;">☁️</div>
|
| 210 |
-
<div style="font-size: 14px; opacity: 0.8;">Cloudiness</div>
|
| 211 |
-
<div style="font-size: 24px; font-weight: 600;">{clouds}%</div>
|
| 212 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 213 |
|
| 214 |
-
<div
|
| 215 |
-
<
|
| 216 |
-
|
| 217 |
-
<
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 218 |
</div>
|
| 219 |
|
| 220 |
-
<div
|
| 221 |
-
<
|
| 222 |
-
|
| 223 |
-
<
|
| 224 |
</div>
|
| 225 |
|
| 226 |
-
<div
|
| 227 |
-
|
| 228 |
-
<div style="font-size: 14px; opacity: 0.8;">Sunrise</div>
|
| 229 |
-
<div style="font-size: 20px; font-weight: 600;">{sunrise}</div>
|
| 230 |
</div>
|
| 231 |
</div>
|
| 232 |
|
| 233 |
-
<!--
|
| 234 |
-
<div style="text-align: center; margin-top:
|
| 235 |
-
<
|
| 236 |
-
|
| 237 |
-
<div style="font-size: 14px; opacity: 0.8;">Sunset</div>
|
| 238 |
-
<div style="font-size: 20px; font-weight: 600;">{sunset}</div>
|
| 239 |
-
</div>
|
| 240 |
</div>
|
| 241 |
|
| 242 |
-
<!-- Ramzan Footer -->
|
| 243 |
-
<div style="text-align: center; margin-top: 30px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,0.3);">
|
| 244 |
-
<p class="ramzan-decoration" style="font-size: 20px; margin: 10px 0;">
|
| 245 |
-
🌙 Ramadan Mubarak ✨
|
| 246 |
-
</p>
|
| 247 |
-
<p style="font-size: 14px; opacity: 0.8;">
|
| 248 |
-
Stay blessed during this holy month
|
| 249 |
-
</p>
|
| 250 |
-
</div>
|
| 251 |
</div>
|
| 252 |
"""
|
| 253 |
|
| 254 |
-
return
|
| 255 |
|
| 256 |
# =========================
|
| 257 |
-
#
|
| 258 |
# =========================
|
| 259 |
custom_css = """
|
| 260 |
.gradio-container {
|
| 261 |
-
|
| 262 |
-
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
|
| 263 |
-
}
|
| 264 |
-
|
| 265 |
-
.contain {
|
| 266 |
-
max-width: 900px !important;
|
| 267 |
}
|
| 268 |
|
| 269 |
footer {
|
| 270 |
display: none !important;
|
| 271 |
}
|
| 272 |
-
|
| 273 |
-
#component-0 {
|
| 274 |
-
background: rgba(255, 255, 255, 0.95) !important;
|
| 275 |
-
border-radius: 20px !important;
|
| 276 |
-
padding: 30px !important;
|
| 277 |
-
box-shadow: 0 20px 60px rgba(0,0,0,0.3) !important;
|
| 278 |
-
}
|
| 279 |
"""
|
| 280 |
|
| 281 |
demo = gr.Interface(
|
| 282 |
-
fn=
|
| 283 |
inputs=gr.Textbox(
|
| 284 |
-
label="🌍 Enter
|
| 285 |
-
placeholder="e.g., Sylhet, Dhaka,
|
| 286 |
lines=1
|
| 287 |
),
|
| 288 |
-
outputs=gr.HTML(label="
|
| 289 |
-
title="🌙
|
| 290 |
description="""
|
| 291 |
-
<div style='text-align: center; padding: 20px;'>
|
| 292 |
-
<
|
| 293 |
-
<p style='
|
|
|
|
| 294 |
</div>
|
| 295 |
""",
|
| 296 |
css=custom_css,
|
|
@@ -303,17 +692,16 @@ demo = gr.Interface(
|
|
| 303 |
["Dhaka"],
|
| 304 |
["Mecca"],
|
| 305 |
["Medina"],
|
|
|
|
| 306 |
["London"],
|
|
|
|
| 307 |
],
|
| 308 |
cache_examples=False,
|
| 309 |
)
|
| 310 |
|
| 311 |
-
# =========================
|
| 312 |
-
# 🎯 Launch Configuration
|
| 313 |
-
# =========================
|
| 314 |
if __name__ == "__main__":
|
| 315 |
demo.launch(
|
| 316 |
-
share=False,
|
| 317 |
-
server_name="0.0.0.0",
|
| 318 |
-
server_port=7860,
|
| 319 |
)
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
import requests
|
| 3 |
+
from datetime import datetime, timedelta
|
| 4 |
+
import random
|
| 5 |
|
| 6 |
# =========================
|
| 7 |
# 🔑 OpenWeather API Key
|
|
|
|
| 9 |
API_KEY = "3a97c8c63350b72e8439c42e8d371b07"
|
| 10 |
|
| 11 |
# =========================
|
| 12 |
+
# 📿 50 Moral Hadiths (English + Bengali)
|
| 13 |
# =========================
|
| 14 |
+
HADITHS = [
|
| 15 |
+
{
|
| 16 |
+
"english": "The best among you are those who have the best manners and character.",
|
| 17 |
+
"bengali": "তোমাদের মধ্যে সর্বোত্তম সেই ব্যক্তি যার চরিত্র ও আচরণ সবচেয়ে সুন্দর।",
|
| 18 |
+
"reference": "Sahih Bukhari",
|
| 19 |
+
"happy_message": "Let your beautiful character shine today and spread joy to everyone you meet! 😊",
|
| 20 |
+
"salam": "As-Salamu Alaikum Wa Rahmatullahi Wa Barakatuh! 🌙"
|
| 21 |
+
},
|
| 22 |
+
{
|
| 23 |
+
"english": "Kindness is a mark of faith, and whoever is not kind has no faith.",
|
| 24 |
+
"bengali": "দয়া ঈমানের নিদর্শন, এবং যে দয়ালু নয় তার ঈমান নেই।",
|
| 25 |
+
"reference": "Sahih Muslim",
|
| 26 |
+
"happy_message": "Your kindness can change someone's entire day - be that light! ✨",
|
| 27 |
+
"salam": "As-Salamu Alaikum! May Allah bless your day! 🤲"
|
| 28 |
+
},
|
| 29 |
+
{
|
| 30 |
+
"english": "None of you truly believes until he loves for his brother what he loves for himself.",
|
| 31 |
+
"bengali": "তোমাদের কেউ প্রকৃত মুমিন হতে পারবে না যতক্ষণ না সে তার ভাইয়ের জন্য তাই পছন্দ করে যা নিজের জন্য পছন্দ করে।",
|
| 32 |
+
"reference": "Sahih Bukhari & Muslim",
|
| 33 |
+
"happy_message": "Wishing good for others brings blessings to your own life! 🌟",
|
| 34 |
+
"salam": "As-Salamu Alaikum Wa Rahmatullah! Peace be upon you! 🕊️"
|
| 35 |
+
},
|
| 36 |
+
{
|
| 37 |
+
"english": "A smile for your brother is charity.",
|
| 38 |
+
"bengali": "তোমার ভাইয়ের জন্য হাসি দেখানো সদকা।",
|
| 39 |
+
"reference": "Tirmidhi",
|
| 40 |
+
"happy_message": "Your beautiful smile is a gift - share it generously today! 😄",
|
| 41 |
+
"salam": "As-Salamu Alaikum! Keep smiling and spreading joy! 🌈"
|
| 42 |
+
},
|
| 43 |
+
{
|
| 44 |
+
"english": "The most beloved to Allah is he who is most beneficial to people.",
|
| 45 |
+
"bengali": "আল্লাহর কাছে সবচেয়ে প্রিয় সেই ব্যক্তি যে মানুষের জন্য সবচেয়ে বেশি উপকারী।",
|
| 46 |
+
"reference": "Al-Mu'jam Al-Awsat",
|
| 47 |
+
"happy_message": "Help someone today and feel the joy of making a difference! 💫",
|
| 48 |
+
"salam": "As-Salamu Alaikum Wa Rahmatullahi Wa Barakatuh! 🌙✨"
|
| 49 |
+
},
|
| 50 |
+
{
|
| 51 |
+
"english": "Do not belittle any good deed, even meeting your brother with a cheerful face.",
|
| 52 |
+
"bengali": "কোনো ভালো কাজকে ছোট মনে করো না, এমনকি তোমার ভাইয়ের সাথে হাসিমুখে দেখা করাও।",
|
| 53 |
+
"reference": "Sahih Muslim",
|
| 54 |
+
"happy_message": "Every small act of goodness counts - start with a smile! 😊",
|
| 55 |
+
"salam": "As-Salamu Alaikum! May your day be filled with goodness! 🌸"
|
| 56 |
+
},
|
| 57 |
+
{
|
| 58 |
+
"english": "The strong person is not the one who overpowers others, but the one who controls his anger.",
|
| 59 |
+
"bengali": "শক্তিশালী ব্যক্তি সেই নয় যে অন্যকে পরাজিত করে, বরং সেই যে নিজের ক্রোধ নিয়ন্ত্রণ করে।",
|
| 60 |
+
"reference": "Sahih Bukhari & Muslim",
|
| 61 |
+
"happy_message": "True strength lies in patience and self-control! 💪",
|
| 62 |
+
"salam": "As-Salamu Alaikum Wa Rahmatullah! Stay strong and peaceful! 🕊️"
|
| 63 |
+
},
|
| 64 |
+
{
|
| 65 |
+
"english": "Feed the hungry, visit the sick, and free the captive.",
|
| 66 |
+
"bengali": "ক্ষুধার্তকে খাওয়াও, অসুস্থকে দেখতে যাও এবং বন্দীকে মুক্ত করো।",
|
| 67 |
+
"reference": "Sahih Bukhari",
|
| 68 |
+
"happy_message": "Reach out to those in need - your care matters! 🤲",
|
| 69 |
+
"salam": "As-Salamu Alaikum! May Allah reward your compassion! 🌟"
|
| 70 |
+
},
|
| 71 |
+
{
|
| 72 |
+
"english": "Show mercy to those on earth, and He who is in the heavens will show mercy to you.",
|
| 73 |
+
"bengali": "পৃথিবীতে যারা আছে তাদের প্রতি দয়া করো, তাহলে আসমানে যিনি আছেন তিনি তোমার প্রতি দয়া করবেন।",
|
| 74 |
+
"reference": "Tirmidhi",
|
| 75 |
+
"happy_message": "Your mercy today brings divine mercy tomorrow! 🌙",
|
| 76 |
+
"salam": "As-Salamu Alaikum Wa Rahmatullahi Wa Barakatuh! 💝"
|
| 77 |
+
},
|
| 78 |
+
{
|
| 79 |
+
"english": "He who does not show mercy to others, will not be shown mercy.",
|
| 80 |
+
"bengali": "যে অন্যদের প্রতি দয়া করে না, তাকেও দয়া করা হবে না।",
|
| 81 |
+
"reference": "Sahih Muslim",
|
| 82 |
+
"happy_message": "Be kind, be merciful - it comes back to you! 🔄",
|
| 83 |
+
"salam": "As-Salamu Alaikum! Spread mercy and love! ❤️"
|
| 84 |
+
},
|
| 85 |
+
{
|
| 86 |
+
"english": "Make things easy and do not make them difficult.",
|
| 87 |
+
"bengali": "জিনিসগুলো সহজ করো এবং কঠিন করো না।",
|
| 88 |
+
"reference": "Sahih Bukhari",
|
| 89 |
+
"happy_message": "Life is easier when we help each other! 🤝",
|
| 90 |
+
"salam": "As-Salamu Alaikum! May Allah make things easy for you! 🌈"
|
| 91 |
+
},
|
| 92 |
+
{
|
| 93 |
+
"english": "Speak good or remain silent.",
|
| 94 |
+
"bengali": "ভালো কথা বলো অথবা চুপ থাকো।",
|
| 95 |
+
"reference": "Sahih Bukhari & Muslim",
|
| 96 |
+
"happy_message": "Your words have power - use them wisely and kindly! 💬",
|
| 97 |
+
"salam": "As-Salamu Alaikum Wa Rahmatullah! Speak with wisdom! 📿"
|
| 98 |
+
},
|
| 99 |
+
{
|
| 100 |
+
"english": "The believer is not a slanderer, nor obscene, nor harsh.",
|
| 101 |
+
"bengali": "মুমিন ব্যক্তি নিন্দুক নয়, অশ্লীল নয়, কঠোরও নয়।",
|
| 102 |
+
"reference": "Sahih Muslim",
|
| 103 |
+
"happy_message": "Be gentle in your words and actions - it's beautiful! 🌺",
|
| 104 |
+
"salam": "As-Salamu Alaikum! May your character be noble! 👑"
|
| 105 |
+
},
|
| 106 |
+
{
|
| 107 |
+
"english": "Remove harmful things from the path; this is charity.",
|
| 108 |
+
"bengali": "পথ থেকে ক্ষতিকর জিনিস সরিয়ে দাও; এটি সদকা।",
|
| 109 |
+
"reference": "Sahih Bukhari & Muslim",
|
| 110 |
+
"happy_message": "Small acts of cleanliness bring great rewards! 🧹✨",
|
| 111 |
+
"salam": "As-Salamu Alaikum! Keep your surroundings clean! 🌿"
|
| 112 |
+
},
|
| 113 |
+
{
|
| 114 |
+
"english": "Do not envy one another, do not hate one another, do not turn away from one another.",
|
| 115 |
+
"bengali": "একে অপরকে হিংসা করো না, ঘৃণা করো না, একে অপর থেকে মুখ ফিরিয়ে নিও না।",
|
| 116 |
+
"reference": "Sahih Muslim",
|
| 117 |
+
"happy_message": "Celebrate others' success - there's enough blessings for everyone! 🎉",
|
| 118 |
+
"salam": "As-Salamu Alaikum Wa Rahmatullahi Wa Barakatuh! 💖"
|
| 119 |
+
},
|
| 120 |
+
{
|
| 121 |
+
"english": "Help your brother, whether he is an oppressor or oppressed.",
|
| 122 |
+
"bengali": "তোমার ভাইকে সাহায্য করো, সে অত্যাচারী হোক বা অত্যাচারিত।",
|
| 123 |
+
"reference": "Sahih Bukhari & Muslim",
|
| 124 |
+
"happy_message": "True help means guiding toward justice and goodness! ⚖️",
|
| 125 |
+
"salam": "As-Salamu Alaikum! Be a helper and a guide! 🌟"
|
| 126 |
+
},
|
| 127 |
+
{
|
| 128 |
+
"english": "Avoid suspicion, for suspicion is the worst of false tales.",
|
| 129 |
+
"bengali": "সন্দেহ এড়িয়ে চলো, কারণ সন্দেহ সবচেয়ে খারাপ মিথ্যা কথা।",
|
| 130 |
+
"reference": "Sahih Bukhari & Muslim",
|
| 131 |
+
"happy_message": "Think good of others - positivity attracts blessings! 🌞",
|
| 132 |
+
"salam": "As-Salamu Alaikum Wa Rahmatullah! Think positive! 💭"
|
| 133 |
+
},
|
| 134 |
+
{
|
| 135 |
+
"english": "The best charity is that given in secret.",
|
| 136 |
+
"bengali": "সর্বোত্তম সদকা হলো যা গোপনে দেওয়া হয়।",
|
| 137 |
+
"reference": "Sahih Bukhari",
|
| 138 |
+
"happy_message": "Give quietly and let Allah reward you abundantly! 🎁",
|
| 139 |
+
"salam": "As-Salamu Alaikum! May your charity be blessed! 🤲"
|
| 140 |
+
},
|
| 141 |
+
{
|
| 142 |
+
"english": "Protect yourself from hellfire even by giving half a date in charity.",
|
| 143 |
+
"bengali": "এমনকি অর্ধেক খেজুর দান করে হলেও নিজেকে জাহান্নাম থেকে রক্ষা করো।",
|
| 144 |
+
"reference": "Sahih Bukhari & Muslim",
|
| 145 |
+
"happy_message": "No charity is too small when given with a sincere heart! 💝",
|
| 146 |
+
"salam": "As-Salamu Alaikum Wa Rahmatullahi Wa Barakatuh! 🌙"
|
| 147 |
+
},
|
| 148 |
+
{
|
| 149 |
+
"english": "Whoever alleviates the hardship of a believer in this world, Allah will alleviate his hardship on the Day of Judgment.",
|
| 150 |
+
"bengali": "যে কেউ এই দুনিয়ায় একজন মুমিনের কষ্ট লাঘব করে, আল্লাহ কিয়ামতের দিন তার কষ্ট লাঘব করবেন।",
|
| 151 |
+
"reference": "Sahih Muslim",
|
| 152 |
+
"happy_message": "Help ease someone's burden today - Allah sees everything! 👁️",
|
| 153 |
+
"salam": "As-Salamu Alaikum! May Allah ease your difficulties! 🤲"
|
| 154 |
+
},
|
| 155 |
+
{
|
| 156 |
+
"english": "Treat your parents with kindness.",
|
| 157 |
+
"bengali": "তোমার পিতামাতার সাথে সদয় ব্যবহার করো।",
|
| 158 |
+
"reference": "Sahih Bukhari & Muslim",
|
| 159 |
+
"happy_message": "Show love to your parents - their prayers are powerful! 👨👩👦",
|
| 160 |
+
"salam": "As-Salamu Alaikum Wa Rahmatullah! Honor your parents! 💕"
|
| 161 |
+
},
|
| 162 |
+
{
|
| 163 |
+
"english": "The rights of neighbors are very important in Islam.",
|
| 164 |
+
"bengali": "ইসলামে প্রতিবেশীদের অধিকার অত্যন্ত গুরুত্বপূর্ণ।",
|
| 165 |
+
"reference": "Sahih Bukhari",
|
| 166 |
+
"happy_message": "A kind neighbor makes a happy community! 🏘️",
|
| 167 |
+
"salam": "As-Salamu Alaikum! Be a blessing to your neighbors! 🌟"
|
| 168 |
+
},
|
| 169 |
+
{
|
| 170 |
+
"english": "Help your neighbor even if he is a stranger.",
|
| 171 |
+
"bengali": "তোমার প্রতিবেশীকে সাহায্য করো যদিও সে অপরিচিত।",
|
| 172 |
+
"reference": "Sahih Muslim",
|
| 173 |
+
"happy_message": "Kindness to neighbors brings peace to your home! 🏡",
|
| 174 |
+
"salam": "As-Salamu Alaikum Wa Rahmatullahi Wa Barakatuh! 💚"
|
| 175 |
+
},
|
| 176 |
+
{
|
| 177 |
+
"english": "A good word is charity.",
|
| 178 |
+
"bengali": "একটি ভালো কথা সদকা।",
|
| 179 |
+
"reference": "Sahih Bukhari & Muslim",
|
| 180 |
+
"happy_message": "Your kind words can heal hearts - speak them freely! 💬💖",
|
| 181 |
+
"salam": "As-Salamu Alaikum! Speak words of kindness! 🌸"
|
| 182 |
+
},
|
| 183 |
+
{
|
| 184 |
+
"english": "Do not mock others, nor insult them, nor defame them.",
|
| 185 |
+
"bengali": "অন্যদের উপহাস করো না, অপমান করো না, তাদের মানহানি করো না।",
|
| 186 |
+
"reference": "Sahih Muslim",
|
| 187 |
+
"happy_message": "Respect everyone - we're all Allah's creation! 🌍",
|
| 188 |
+
"salam": "As-Salamu Alaikum Wa Rahmatullah! Show respect to all! 🙏"
|
| 189 |
+
},
|
| 190 |
+
{
|
| 191 |
+
"english": "Avoid anger and forgive others.",
|
| 192 |
+
"bengali": "রাগ এড়িয়ে চলো এবং অন্যদের ক্ষমা করো।",
|
| 193 |
+
"reference": "Sahih Bukhari",
|
| 194 |
+
"happy_message": "Forgiveness sets you free and brings inner peace! 🕊️",
|
| 195 |
+
"salam": "As-Salamu Alaikum! Choose peace over anger! ☮️"
|
| 196 |
+
},
|
| 197 |
+
{
|
| 198 |
+
"english": "Visit the sick, feed the hungry, and free the captives.",
|
| 199 |
+
"bengali": "অসুস্থদের দেখতে যাও, ক্ষুধার্তদের খাওয়াও এবং বন্দীদের মুক্ত করো।",
|
| 200 |
+
"reference": "Sahih Bukhari",
|
| 201 |
+
"happy_message": "Your compassion in action makes the world better! 🌎",
|
| 202 |
+
"salam": "As-Salamu Alaikum Wa Rahmatullahi Wa Barakatuh! 🤲"
|
| 203 |
+
},
|
| 204 |
+
{
|
| 205 |
+
"english": "Be merciful to the young, and respect the elderly.",
|
| 206 |
+
"bengali": "তরুণদের প্রতি দয়ালু হও এবং বয়স্কদের সম্মান করো।",
|
| 207 |
+
"reference": "Abu Dawud",
|
| 208 |
+
"happy_message": "Love the young, honor the old - this is beautiful! 👶👴",
|
| 209 |
+
"salam": "As-Salamu Alaikum! Respect all ages! 🌈"
|
| 210 |
+
},
|
| 211 |
+
{
|
| 212 |
+
"english": "Speak softly; harsh speech turns people away.",
|
| 213 |
+
"bengali": "মৃদু কথা বলো; কঠোর কথা মানুষকে দূরে সরিয়ে দেয়।",
|
| 214 |
+
"reference": "Tirmidhi",
|
| 215 |
+
"happy_message": "Gentle words open hearts and minds! 💝",
|
| 216 |
+
"salam": "As-Salamu Alaikum Wa Rahmatullah! Be gentle! 🌺"
|
| 217 |
+
},
|
| 218 |
+
{
|
| 219 |
+
"english": "Do not waste food; it is a blessing.",
|
| 220 |
+
"bengali": "খাবার নষ্ট করো না; এটি একটি আশীর্বাদ।",
|
| 221 |
+
"reference": "Sahih Bukhari & Muslim",
|
| 222 |
+
"happy_message": "Gratitude for food brings more blessings! 🍽️",
|
| 223 |
+
"salam": "As-Salamu Alaikum! Be grateful for every bite! 🙏"
|
| 224 |
+
},
|
| 225 |
+
{
|
| 226 |
+
"english": "Help animals; treat them with kindness.",
|
| 227 |
+
"bengali": "পশুদের সাহায্য করো; তাদের সাথে দয়ালু আচরণ করো।",
|
| 228 |
+
"reference": "Sahih Bukhari",
|
| 229 |
+
"happy_message": "Kindness to animals shows a pure heart! 🐾",
|
| 230 |
+
"salam": "As-Salamu Alaikum Wa Rahmatullahi Wa Barakatuh! 🦋"
|
| 231 |
+
},
|
| 232 |
+
{
|
| 233 |
+
"english": "Do not oppress anyone, and do not be oppressed.",
|
| 234 |
+
"bengali": "কাউকে অত্যাচার করো না এবং অত্যাচারিত হয়ো না।",
|
| 235 |
+
"reference": "Sahih Muslim",
|
| 236 |
+
"happy_message": "Stand for justice and be strong in faith! ⚖️",
|
| 237 |
+
"salam": "As-Salamu Alaikum! Justice brings peace! ☮️"
|
| 238 |
+
},
|
| 239 |
+
{
|
| 240 |
+
"english": "Be truthful; it leads to righteousness.",
|
| 241 |
+
"bengali": "সত্যবাদী হও; এটি ধার্মিকতার দিকে নিয়ে যায়।",
|
| 242 |
+
"reference": "Sahih Bukhari & Muslim",
|
| 243 |
+
"happy_message": "Truth is a shield that protects you always! 🛡️",
|
| 244 |
+
"salam": "As-Salamu Alaikum Wa Rahmatullah! Speak truth! 💎"
|
| 245 |
+
},
|
| 246 |
+
{
|
| 247 |
+
"english": "Do not break promises or betray trusts.",
|
| 248 |
+
"bengali": "প্রতিশ্রুতি ভঙ্গ করো না বা আমানতের খিয়ানত করো না।",
|
| 249 |
+
"reference": "Sahih Muslim",
|
| 250 |
+
"happy_message": "Trustworthiness makes you a person of honor! 🏆",
|
| 251 |
+
"salam": "As-Salamu Alaikum! Be trustworthy always! 🤝"
|
| 252 |
+
},
|
| 253 |
+
{
|
| 254 |
+
"english": "Maintain ties of kinship.",
|
| 255 |
+
"bengali": "আত্মীয়তার বন্ধন বজায় রাখো।",
|
| 256 |
+
"reference": "Sahih Bukhari & Muslim",
|
| 257 |
+
"happy_message": "Family bonds bring blessings and joy! 👨👩👧👦",
|
| 258 |
+
"salam": "As-Salamu Alaikum Wa Rahmatullahi Wa Barakatuh! 💕"
|
| 259 |
+
},
|
| 260 |
+
{
|
| 261 |
+
"english": "Give the best gift to your family.",
|
| 262 |
+
"bengali": "তোমার পরিবারকে সর্বোত্তম উপহার দাও।",
|
| 263 |
+
"reference": "Tirmidhi",
|
| 264 |
+
"happy_message": "Your time and love are the best gifts! 🎁",
|
| 265 |
+
"salam": "As-Salamu Alaikum! Cherish your family! ❤️"
|
| 266 |
+
},
|
| 267 |
+
{
|
| 268 |
+
"english": "Smile in your brother's face; it is charity.",
|
| 269 |
+
"bengali": "তোমার ভাইয়ের মুখে হাসি দাও; এটি সদকা।",
|
| 270 |
+
"reference": "Sahih Bukhari & Muslim",
|
| 271 |
+
"happy_message": "Your smile is a beautiful sadaqah! 😊",
|
| 272 |
+
"salam": "As-Salamu Alaikum Wa Rahmatullah! Keep smiling! 🌟"
|
| 273 |
+
},
|
| 274 |
+
{
|
| 275 |
+
"english": "Feed your neighbor before yourself.",
|
| 276 |
+
"bengali": "নিজের আগে তোমার প্রতিবেশীকে খাওয়াও।",
|
| 277 |
+
"reference": "Sahih Muslim",
|
| 278 |
+
"happy_message": "Sharing brings multiplied blessings! 🍲",
|
| 279 |
+
"salam": "As-Salamu Alaikum! Share your blessings! 🌙"
|
| 280 |
+
},
|
| 281 |
+
{
|
| 282 |
+
"english": "Be grateful to Allah and to people around you.",
|
| 283 |
+
"bengali": "আল্লাহর এবং তোমার আশেপাশের মানুষের প্রতি কৃতজ্ঞ হও।",
|
| 284 |
+
"reference": "Sahih Muslim",
|
| 285 |
+
"happy_message": "Gratitude opens doors to more blessings! 🚪✨",
|
| 286 |
+
"salam": "As-Salamu Alaikum Wa Rahmatullahi Wa Barakatuh! 🙏"
|
| 287 |
+
},
|
| 288 |
+
{
|
| 289 |
+
"english": "Speak gently to children; harshness harms the soul.",
|
| 290 |
+
"bengali": "শিশুদের সাথে কোমলভাবে কথা বলো; কঠোরতা আত্মাকে ক্ষতিগ্রস্ত করে।",
|
| 291 |
+
"reference": "Abu Dawud",
|
| 292 |
+
"happy_message": "Nurture young hearts with love and kindness! 👶💖",
|
| 293 |
+
"salam": "As-Salamu Alaikum! Be gentle with children! 🌸"
|
| 294 |
+
},
|
| 295 |
+
{
|
| 296 |
+
"english": "Be humble; arrogance distances you from Allah.",
|
| 297 |
+
"bengali": "বিনয়ী হও; অহংকার তোমাকে আল্লাহ থেকে দূরে সরিয়ে দেয়।",
|
| 298 |
+
"reference": "Sahih Muslim",
|
| 299 |
+
"happy_message": "Humility elevates you in the eyes of Allah! 🌙",
|
| 300 |
+
"salam": "As-Salamu Alaikum Wa Rahmatullah! Stay humble! 🙇"
|
| 301 |
+
},
|
| 302 |
+
{
|
| 303 |
+
"english": "Forgive others to be forgiven.",
|
| 304 |
+
"bengali": "ক্ষমা পেতে হলে অন্যদের ক্ষমা করো।",
|
| 305 |
+
"reference": "Sahih Bukhari & Muslim",
|
| 306 |
+
"happy_message": "Forgiveness is freedom for your soul! 🕊️",
|
| 307 |
+
"salam": "As-Salamu Alaikum! Practice forgiveness! 💝"
|
| 308 |
+
},
|
| 309 |
+
{
|
| 310 |
+
"english": "Do not be jealous of others' blessings.",
|
| 311 |
+
"bengali": "অন্যদের আশীর্বাদে ঈর্ষান্বিত হয়ো না।",
|
| 312 |
+
"reference": "Sahih Muslim",
|
| 313 |
+
"happy_message": "Your blessings are on their way - be patient! ⏰",
|
| 314 |
+
"salam": "As-Salamu Alaikum Wa Rahmatullahi Wa Barakatuh! 🌟"
|
| 315 |
+
},
|
| 316 |
+
{
|
| 317 |
+
"english": "A Muslim is one from whose tongue and hand people are safe.",
|
| 318 |
+
"bengali": "মুসলিম সেই ব্যক্তি যার জিহ্বা ও হাত থেকে মানুষ নিরাপদ।",
|
| 319 |
+
"reference": "Sahih Bukhari & Muslim",
|
| 320 |
+
"happy_message": "Be a source of safety and peace for others! 🛡️",
|
| 321 |
+
"salam": "As-Salamu Alaikum Wa Rahmatullah! Be harmless! 🕊️"
|
| 322 |
+
},
|
| 323 |
+
{
|
| 324 |
+
"english": "Pray for your brother in his absence.",
|
| 325 |
+
"bengali": "তোমার ভাইয়ের অনুপস্থিতিতে তার জন্য দোয়া করো।",
|
| 326 |
+
"reference": "Sahih Muslim",
|
| 327 |
+
"happy_message": "Silent prayers for others bring angels' blessings to you! 👼",
|
| 328 |
+
"salam": "As-Salamu Alaikum! Pray for each other! 🤲"
|
| 329 |
+
},
|
| 330 |
+
{
|
| 331 |
+
"english": "The best deed is that done regularly, even if small.",
|
| 332 |
+
"bengali": "সর্বোত্তম কাজ হলো যা নিয়মিত করা হয়, এমনকি ছোট হলেও।",
|
| 333 |
+
"reference": "Sahih Bukhari & Muslim",
|
| 334 |
+
"happy_message": "Consistency in small deeds brings great rewards! 🌟",
|
| 335 |
+
"salam": "As-Salamu Alaikum Wa Rahmatullahi Wa Barakatuh! 💫"
|
| 336 |
+
},
|
| 337 |
+
{
|
| 338 |
+
"english": "Do not abandon prayer; it nurtures your heart.",
|
| 339 |
+
"bengali": "নামাজ ত্যাগ করো না; এটি তোমার হৃদয়কে পুষ্টি দেয়।",
|
| 340 |
+
"reference": "Sahih Muslim",
|
| 341 |
+
"happy_message": "Prayer is your direct connection to peace! 🕌",
|
| 342 |
+
"salam": "As-Salamu Alaikum Wa Rahmatullah! Pray regularly! 📿"
|
| 343 |
+
},
|
| 344 |
+
{
|
| 345 |
+
"english": "Be patient in hardship; it is the key to faith.",
|
| 346 |
+
"bengali": "কষ্টে ধৈর্য ধরো; এটি ঈমানের চাবিকাঠি।",
|
| 347 |
+
"reference": "Sahih Bukhari & Muslim",
|
| 348 |
+
"happy_message": "After hardship comes ease - hold on! 🌈",
|
| 349 |
+
"salam": "As-Salamu Alaikum! Stay patient and hopeful! 🌙"
|
| 350 |
+
},
|
| 351 |
+
{
|
| 352 |
+
"english": "Avoid idle talk; it wastes the soul.",
|
| 353 |
+
"bengali": "অলস কথা এড়িয়ে চলো; এটি আত্মাকে নষ্ট করে।",
|
| 354 |
+
"reference": "Abu Dawud",
|
| 355 |
+
"happy_message": "Use your words wisely - they matter! 💬",
|
| 356 |
+
"salam": "As-Salamu Alaikum Wa Rahmatullahi Wa Barakatuh! 🌟"
|
| 357 |
+
},
|
| 358 |
+
{
|
| 359 |
+
"english": "Love for others what you love for yourself; this is faith.",
|
| 360 |
+
"bengali": "অন্যদের জন্য তাই ভালোবাসো যা নিজের জন্য ভালোবাসো; এটিই ঈমান।",
|
| 361 |
+
"reference": "Sahih Bukhari & Muslim",
|
| 362 |
+
"happy_message": "Wishing well for others brings blessings to you! 🌟",
|
| 363 |
+
"salam": "As-Salamu Alaikum Wa Rahmatullah! Love and be loved! 💖"
|
| 364 |
+
}
|
| 365 |
+
]
|
| 366 |
+
|
| 367 |
+
# =========================
|
| 368 |
+
# 🌡️ Temperature-Based Advice
|
| 369 |
+
# =========================
|
| 370 |
+
def get_temperature_advice(temp, weather_main):
|
| 371 |
+
"""Generate personalized advice based on temperature and weather"""
|
| 372 |
+
advice = []
|
| 373 |
+
|
| 374 |
+
# Temperature-based suggestions
|
| 375 |
+
if temp > 35:
|
| 376 |
+
advice.append("🔥 **Extreme Heat Alert!**")
|
| 377 |
+
advice.append("• Stay indoors during peak hours (12 PM - 4 PM)")
|
| 378 |
+
advice.append("• If going out for shopping, go early morning or after sunset")
|
| 379 |
+
advice.append("• Drink water every 15-20 minutes")
|
| 380 |
+
advice.append("• Avoid heavy physical activity")
|
| 381 |
+
advice.append("• Perfect weather for indoor activities, reading Quran, or resting")
|
| 382 |
+
elif temp > 30:
|
| 383 |
+
advice.append("🌡️ **Hot Weather**")
|
| 384 |
+
advice.append("• Good time for morning walks before 9 AM")
|
| 385 |
+
advice.append("• Shopping is better in the evening after 6 PM")
|
| 386 |
+
advice.append("• Drink 8-10 glasses of water during non-fasting hours")
|
| 387 |
+
advice.append("• Light outdoor activities in the evening are okay")
|
| 388 |
+
advice.append("• Use umbrella if going out during day")
|
| 389 |
+
elif temp > 25:
|
| 390 |
+
advice.append("☀️ **Pleasant Warm Weather**")
|
| 391 |
+
advice.append("• Perfect for evening walks after Iftar")
|
| 392 |
+
advice.append("• Good time for shopping anytime")
|
| 393 |
+
advice.append("• Moderate outdoor activities are fine")
|
| 394 |
+
advice.append("• Stay hydrated - drink regularly")
|
| 395 |
+
advice.append("• Great weather for family outings")
|
| 396 |
+
elif temp > 20:
|
| 397 |
+
advice.append("🌤️ **Comfortable Weather**")
|
| 398 |
+
advice.append("• Ideal for outdoor activities all day")
|
| 399 |
+
advice.append("• Perfect for shopping, walking, or exercise")
|
| 400 |
+
advice.append("• Light clothing recommended")
|
| 401 |
+
advice.append("• Enjoy the pleasant weather!")
|
| 402 |
+
advice.append("• Great for community activities")
|
| 403 |
+
elif temp > 15:
|
| 404 |
+
advice.append("🍃 **Cool Weather**")
|
| 405 |
+
advice.append("• Light jacket recommended for evening")
|
| 406 |
+
advice.append("• Perfect for outdoor prayers and activities")
|
| 407 |
+
advice.append("• Good weather for visiting friends and family")
|
| 408 |
+
advice.append("• Enjoy the cool breeze!")
|
| 409 |
+
else:
|
| 410 |
+
advice.append("❄️ **Cold Weather**")
|
| 411 |
+
advice.append("• Wear warm clothes when going out")
|
| 412 |
+
advice.append("• Indoor activities recommended")
|
| 413 |
+
advice.append("• Hot drinks during Suhoor and Iftar")
|
| 414 |
+
advice.append("• Take care of the elderly and children")
|
| 415 |
+
|
| 416 |
+
# Weather-specific advice
|
| 417 |
+
if weather_main == "rain":
|
| 418 |
+
advice.append("\n☔ **Rainy Day Tips:**")
|
| 419 |
+
advice.append("• Carry umbrella if going out")
|
| 420 |
+
advice.append("• Best to stay indoors and do ibadah")
|
| 421 |
+
advice.append("• Perfect weather for reading and reflection")
|
| 422 |
+
advice.append("• Make dua - rain is a time of acceptance!")
|
| 423 |
+
elif weather_main == "thunderstorm":
|
| 424 |
+
advice.append("\n⛈️ **Thunderstorm Warning:**")
|
| 425 |
+
advice.append("• Avoid going out unless necessary")
|
| 426 |
+
advice.append("• Stay safe indoors")
|
| 427 |
+
advice.append("• Recite recommended duas during thunder")
|
| 428 |
+
elif weather_main == "clouds":
|
| 429 |
+
advice.append("\n☁️ **Cloudy Weather:**")
|
| 430 |
+
advice.append("• Pleasant for outdoor activities")
|
| 431 |
+
advice.append("• No harsh sun - good for shopping!")
|
| 432 |
+
advice.append("• Comfortable for walks")
|
| 433 |
+
|
| 434 |
+
return "\n".join(advice)
|
| 435 |
+
|
| 436 |
+
# =========================
|
| 437 |
+
# 🕌 Calculate Prayer Times (Simplified)
|
| 438 |
+
# =========================
|
| 439 |
+
def estimate_prayer_times(sunrise_ts, sunset_ts):
|
| 440 |
+
"""Estimate Sehri and Iftar times from sunrise/sunset"""
|
| 441 |
+
sunrise = datetime.fromtimestamp(sunrise_ts)
|
| 442 |
+
sunset = datetime.fromtimestamp(sunset_ts)
|
| 443 |
+
|
| 444 |
+
# Sehri ends ~10-15 minutes before sunrise
|
| 445 |
+
sehri_end = sunrise - timedelta(minutes=10)
|
| 446 |
+
|
| 447 |
+
# Iftar starts at sunset
|
| 448 |
+
iftar_start = sunset
|
| 449 |
+
|
| 450 |
+
return {
|
| 451 |
+
"sehri_end": sehri_end.strftime("%I:%M %p"),
|
| 452 |
+
"iftar_start": iftar_start.strftime("%I:%M %p"),
|
| 453 |
+
"sunrise": sunrise.strftime("%I:%M %p"),
|
| 454 |
+
"sunset": sunset.strftime("%I:%M %p")
|
| 455 |
+
}
|
| 456 |
+
|
| 457 |
+
# =========================
|
| 458 |
+
# 🌙 Main Ramadan Dashboard
|
| 459 |
+
# =========================
|
| 460 |
+
def get_ramadan_dashboard(city):
|
| 461 |
if not city:
|
| 462 |
return """
|
| 463 |
<div style="text-align:center; padding:40px; color:#ff6b6b;">
|
|
|
|
| 465 |
</div>
|
| 466 |
"""
|
| 467 |
|
| 468 |
+
# Get random daily Hadith
|
| 469 |
+
daily_hadith = random.choice(HADITHS)
|
| 470 |
+
|
| 471 |
+
# API call for weather
|
| 472 |
city_query = city.strip()
|
| 473 |
url = f"http://api.openweathermap.org/data/2.5/weather?q={city_query}&appid={API_KEY}&units=metric"
|
| 474 |
|
| 475 |
try:
|
| 476 |
response = requests.get(url, timeout=10)
|
| 477 |
data = response.json()
|
| 478 |
+
except:
|
| 479 |
return """
|
| 480 |
<div style="text-align:center; padding:40px; color:#ff6b6b;">
|
| 481 |
<h3>❌ Error connecting to OpenWeather API</h3>
|
|
|
|
| 482 |
</div>
|
| 483 |
"""
|
| 484 |
|
|
|
|
| 486 |
return f"""
|
| 487 |
<div style="text-align:center; padding:40px; color:#ff6b6b;">
|
| 488 |
<h3>🔍 City '{city_query}' not found!</h3>
|
|
|
|
| 489 |
</div>
|
| 490 |
"""
|
| 491 |
|
| 492 |
+
# Extract data
|
| 493 |
temp = data["main"]["temp"]
|
| 494 |
feels_like = data["main"]["feels_like"]
|
|
|
|
|
|
|
| 495 |
humidity = data["main"]["humidity"]
|
|
|
|
| 496 |
description = data["weather"][0]["description"].title()
|
| 497 |
weather_main = data["weather"][0]["main"].lower()
|
| 498 |
wind_speed = data["wind"]["speed"]
|
|
|
|
| 499 |
country = data["sys"]["country"]
|
| 500 |
|
| 501 |
+
# Prayer times
|
| 502 |
+
prayer_times = estimate_prayer_times(data["sys"]["sunrise"], data["sys"]["sunset"])
|
|
|
|
|
|
|
| 503 |
|
| 504 |
+
# Temperature advice
|
| 505 |
+
temp_advice = get_temperature_advice(temp, weather_main)
|
| 506 |
|
| 507 |
+
# Weather gradient
|
| 508 |
weather_gradients = {
|
| 509 |
"clear": "linear-gradient(135deg, #667eea 0%, #764ba2 100%)",
|
| 510 |
"clouds": "linear-gradient(135deg, #bdc3c7 0%, #2c3e50 100%)",
|
|
|
|
| 512 |
"drizzle": "linear-gradient(135deg, #a8edea 0%, #fed6e3 100%)",
|
| 513 |
"thunderstorm": "linear-gradient(135deg, #4b6cb7 0%, #182848 100%)",
|
| 514 |
"snow": "linear-gradient(135deg, #e6dada 0%, #274046 100%)",
|
|
|
|
|
|
|
|
|
|
| 515 |
}
|
|
|
|
| 516 |
gradient = weather_gradients.get(weather_main, "linear-gradient(135deg, #667eea 0%, #764ba2 100%)")
|
| 517 |
|
| 518 |
+
# Weather icons
|
| 519 |
weather_icons = {
|
| 520 |
"clear": "☀️",
|
| 521 |
"clouds": "☁️",
|
| 522 |
"rain": "🌧️",
|
|
|
|
| 523 |
"thunderstorm": "⛈️",
|
| 524 |
"snow": "❄️",
|
| 525 |
"mist": "🌫️",
|
|
|
|
|
|
|
|
|
|
|
|
|
| 526 |
}
|
|
|
|
| 527 |
icon = weather_icons.get(weather_main, "🌤️")
|
| 528 |
|
| 529 |
+
# Build HTML
|
| 530 |
+
html = f"""
|
| 531 |
<style>
|
| 532 |
+
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;700&family=Noto+Sans+Bengali:wght@400;600&display=swap');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 533 |
|
| 534 |
@keyframes fadeIn {{
|
| 535 |
+
from {{ opacity: 0; transform: translateY(30px); }}
|
| 536 |
to {{ opacity: 1; transform: translateY(0); }}
|
| 537 |
}}
|
| 538 |
|
| 539 |
+
@keyframes pulse {{
|
| 540 |
+
0%, 100% {{ transform: scale(1); }}
|
| 541 |
+
50% {{ transform: scale(1.05); }}
|
| 542 |
}}
|
| 543 |
|
| 544 |
+
.dashboard-container {{
|
| 545 |
+
animation: fadeIn 0.8s ease-out;
|
| 546 |
+
font-family: 'Poppins', 'Noto Sans Bengali', sans-serif;
|
|
|
|
| 547 |
}}
|
| 548 |
|
| 549 |
+
.card {{
|
| 550 |
+
background: white;
|
| 551 |
+
border-radius: 20px;
|
| 552 |
+
padding: 30px;
|
| 553 |
+
margin: 20px 0;
|
| 554 |
+
box-shadow: 0 10px 30px rgba(0,0,0,0.1);
|
| 555 |
+
transition: transform 0.3s ease;
|
|
|
|
| 556 |
}}
|
| 557 |
|
| 558 |
+
.card:hover {{
|
| 559 |
transform: translateY(-5px);
|
| 560 |
+
box-shadow: 0 15px 40px rgba(0,0,0,0.15);
|
|
|
|
| 561 |
}}
|
| 562 |
|
| 563 |
+
.ramzan-header {{
|
| 564 |
animation: pulse 2s ease-in-out infinite;
|
| 565 |
}}
|
| 566 |
</style>
|
| 567 |
|
| 568 |
+
<div class="dashboard-container" style="max-width: 800px; margin: 0 auto; padding: 20px;">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 569 |
|
| 570 |
+
<!-- Ramadan Header -->
|
| 571 |
+
<div class="ramzan-header" style="text-align: center; background: {gradient}; color: white; padding: 40px; border-radius: 25px; margin-bottom: 30px;">
|
| 572 |
+
<h1 style="font-size: 48px; margin: 10px 0;">🌙 Ramadan Mubarak 🌙</h1>
|
| 573 |
+
<p style="font-size: 20px; margin: 10px 0;">{city_query.title()}, {country}</p>
|
| 574 |
+
<p style="font-size: 16px; opacity: 0.9;">{datetime.now().strftime("%A, %B %d, %Y")}</p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 575 |
</div>
|
| 576 |
|
| 577 |
+
<!-- Prayer Times Card -->
|
| 578 |
+
<div class="card" style="background: linear-gradient(135deg, #0F9D58 0%, #16C172 100%); color: white;">
|
| 579 |
+
<h2 style="text-align: center; font-size: 32px; margin-bottom: 25px;">🕌 Prayer Times</h2>
|
| 580 |
+
<div style="display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px;">
|
| 581 |
+
<div style="text-align: center; background: rgba(255,255,255,0.2); padding: 20px; border-radius: 15px;">
|
| 582 |
+
<div style="font-size: 36px;">🌅</div>
|
| 583 |
+
<h3 style="font-size: 20px; margin: 10px 0;">Sehri Ends</h3>
|
| 584 |
+
<p style="font-size: 32px; font-weight: 700;">{prayer_times['sehri_end']}</p>
|
| 585 |
+
<p style="font-size: 14px; opacity: 0.9;">Sunrise: {prayer_times['sunrise']}</p>
|
| 586 |
+
</div>
|
| 587 |
+
<div style="text-align: center; background: rgba(255,255,255,0.2); padding: 20px; border-radius: 15px;">
|
| 588 |
+
<div style="font-size: 36px;">🌇</div>
|
| 589 |
+
<h3 style="font-size: 20px; margin: 10px 0;">Iftar Starts</h3>
|
| 590 |
+
<p style="font-size: 32px; font-weight: 700;">{prayer_times['iftar_start']}</p>
|
| 591 |
+
<p style="font-size: 14px; opacity: 0.9;">Sunset: {prayer_times['sunset']}</p>
|
| 592 |
+
</div>
|
| 593 |
</div>
|
| 594 |
</div>
|
| 595 |
|
| 596 |
+
<!-- Weather Card -->
|
| 597 |
+
<div class="card">
|
| 598 |
+
<h2 style="color: #667eea; font-size: 28px; margin-bottom: 20px; text-align: center;">🌡️ Current Weather</h2>
|
| 599 |
+
<div style="text-align: center; background: {gradient}; color: white; padding: 30px; border-radius: 15px;">
|
| 600 |
+
<div style="font-size: 80px; margin: 20px 0;">{icon}</div>
|
| 601 |
+
<h1 style="font-size: 64px; margin: 10px 0;">{temp:.1f}°C</h1>
|
| 602 |
+
<p style="font-size: 24px; margin: 10px 0;">{description}</p>
|
| 603 |
+
<p style="font-size: 18px; opacity: 0.9;">Feels like {feels_like:.1f}°C</p>
|
| 604 |
+
<div style="margin-top: 20px; font-size: 16px;">
|
| 605 |
+
💧 Humidity: {humidity}% | 🌬️ Wind: {wind_speed} m/s
|
| 606 |
+
</div>
|
| 607 |
</div>
|
| 608 |
+
</div>
|
| 609 |
+
|
| 610 |
+
<!-- Temperature Advice Card -->
|
| 611 |
+
<div class="card">
|
| 612 |
+
<h2 style="color: #FF6B6B; font-size: 28px; margin-bottom: 20px;">💡 Today's Recommendations</h2>
|
| 613 |
+
<div style="background: #FFF5F5; padding: 20px; border-radius: 15px; border-left: 5px solid #FF6B6B;">
|
| 614 |
+
<div style="line-height: 1.8; white-space: pre-line;">{temp_advice}</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
| 615 |
</div>
|
| 616 |
+
</div>
|
| 617 |
+
|
| 618 |
+
<!-- Daily Hadith Card -->
|
| 619 |
+
<div class="card" style="background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%); color: white;">
|
| 620 |
+
<h2 style="text-align: center; font-size: 32px; margin-bottom: 25px;">📿 Today's Hadith</h2>
|
| 621 |
|
| 622 |
+
<div style="background: rgba(255,255,255,0.2); padding: 25px; border-radius: 15px; margin-bottom: 20px;">
|
| 623 |
+
<p style="font-size: 20px; line-height: 1.8; margin-bottom: 15px; font-style: italic;">
|
| 624 |
+
"{daily_hadith['english']}"
|
| 625 |
+
</p>
|
| 626 |
+
<p style="font-size: 18px; line-height: 1.8; font-family: 'Noto Sans Bengali', sans-serif; opacity: 0.95;">
|
| 627 |
+
"{daily_hadith['bengali']}"
|
| 628 |
+
</p>
|
| 629 |
+
<p style="text-align: right; font-size: 16px; margin-top: 15px; opacity: 0.9;">
|
| 630 |
+
— {daily_hadith['reference']}
|
| 631 |
+
</p>
|
| 632 |
</div>
|
| 633 |
|
| 634 |
+
<div style="background: rgba(255,255,255,0.15); padding: 20px; border-radius: 15px; margin-bottom: 15px;">
|
| 635 |
+
<p style="font-size: 18px; text-align: center;">
|
| 636 |
+
✨ {daily_hadith['happy_message']} ✨
|
| 637 |
+
</p>
|
| 638 |
</div>
|
| 639 |
|
| 640 |
+
<div style="text-align: center; font-size: 22px; padding: 15px;">
|
| 641 |
+
{daily_hadith['salam']}
|
|
|
|
|
|
|
| 642 |
</div>
|
| 643 |
</div>
|
| 644 |
|
| 645 |
+
<!-- Footer -->
|
| 646 |
+
<div style="text-align: center; padding: 30px; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; border-radius: 20px; margin-top: 30px;">
|
| 647 |
+
<h3 style="font-size: 24px; margin-bottom: 10px;">May Allah accept your fasting and prayers 🤲</h3>
|
| 648 |
+
<p style="font-size: 16px; opacity: 0.9;">Ramadan Kareem! 🌙✨⭐</p>
|
|
|
|
|
|
|
|
|
|
| 649 |
</div>
|
| 650 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 651 |
</div>
|
| 652 |
"""
|
| 653 |
|
| 654 |
+
return html
|
| 655 |
|
| 656 |
# =========================
|
| 657 |
+
# 🎨 Gradio Interface
|
| 658 |
# =========================
|
| 659 |
custom_css = """
|
| 660 |
.gradio-container {
|
| 661 |
+
background: linear-gradient(135deg, #E0F7FA 0%, #B2EBF2 100%) !important;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 662 |
}
|
| 663 |
|
| 664 |
footer {
|
| 665 |
display: none !important;
|
| 666 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 667 |
"""
|
| 668 |
|
| 669 |
demo = gr.Interface(
|
| 670 |
+
fn=get_ramadan_dashboard,
|
| 671 |
inputs=gr.Textbox(
|
| 672 |
+
label="🌍 Enter Your City",
|
| 673 |
+
placeholder="e.g., Sylhet, Dhaka, Mecca, London...",
|
| 674 |
lines=1
|
| 675 |
),
|
| 676 |
+
outputs=gr.HTML(label="Your Daily Ramadan Companion"),
|
| 677 |
+
title="🌙 Complete Ramadan Dashboard 2025",
|
| 678 |
description="""
|
| 679 |
+
<div style='text-align: center; padding: 20px; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; border-radius: 15px;'>
|
| 680 |
+
<h2>Your All-in-One Ramadan Companion</h2>
|
| 681 |
+
<p style='font-size: 16px;'>✨ Weather • Prayer Times • Daily Hadith • Personalized Advice ✨</p>
|
| 682 |
+
<p style='font-size: 14px; opacity: 0.9;'>Get temperature-based recommendations for shopping, rest, and outdoor activities!</p>
|
| 683 |
</div>
|
| 684 |
""",
|
| 685 |
css=custom_css,
|
|
|
|
| 692 |
["Dhaka"],
|
| 693 |
["Mecca"],
|
| 694 |
["Medina"],
|
| 695 |
+
["Istanbul"],
|
| 696 |
["London"],
|
| 697 |
+
["Dubai"],
|
| 698 |
],
|
| 699 |
cache_examples=False,
|
| 700 |
)
|
| 701 |
|
|
|
|
|
|
|
|
|
|
| 702 |
if __name__ == "__main__":
|
| 703 |
demo.launch(
|
| 704 |
+
share=False,
|
| 705 |
+
server_name="0.0.0.0",
|
| 706 |
+
server_port=7860,
|
| 707 |
)
|