Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -274,20 +274,20 @@ class OceanCurrentMapper:
|
|
274 |
conditions = []
|
275 |
|
276 |
if avg_speed < 0.3:
|
277 |
-
conditions.append("
|
278 |
elif avg_speed < 0.8:
|
279 |
-
conditions.append("
|
280 |
else:
|
281 |
-
conditions.append("
|
282 |
|
283 |
if max_speed > 1.0:
|
284 |
conditions.append("π Strong rip currents detected in some areas")
|
285 |
|
286 |
# Add mock weather conditions
|
287 |
conditions.extend([
|
288 |
-
f"
|
289 |
-
f"
|
290 |
-
f"
|
291 |
])
|
292 |
|
293 |
return "\n".join(conditions)
|
@@ -337,7 +337,7 @@ def analyze_conditions(region):
|
|
337 |
with gr.Blocks(title="Ocean Current Mapper", theme=gr.themes.Ocean()) as demo:
|
338 |
gr.Markdown("""
|
339 |
<h1 style="font-size: 3em; text-align: center; color: #2E86AB; margin-bottom: 0.5em;">
|
340 |
-
|
341 |
</h1>
|
342 |
|
343 |
<div style="text-align: center; font-size: 1.2em; margin-bottom: 2em;">
|
|
|
274 |
conditions = []
|
275 |
|
276 |
if avg_speed < 0.3:
|
277 |
+
conditions.append("Low current speeds - good for beginners")
|
278 |
elif avg_speed < 0.8:
|
279 |
+
conditions.append("Moderate currents - suitable for intermediate surfers")
|
280 |
else:
|
281 |
+
conditions.append("Strong currents - experienced surfers only")
|
282 |
|
283 |
if max_speed > 1.0:
|
284 |
conditions.append("π Strong rip currents detected in some areas")
|
285 |
|
286 |
# Add mock weather conditions
|
287 |
conditions.extend([
|
288 |
+
f"Water temperature: {20 + np.random.randint(0, 10)}Β°C",
|
289 |
+
f"Wind: {5 + np.random.randint(0, 15)} mph offshore",
|
290 |
+
f"Wave height: {1 + np.random.randint(0, 3)} meters"
|
291 |
])
|
292 |
|
293 |
return "\n".join(conditions)
|
|
|
337 |
with gr.Blocks(title="Ocean Current Mapper", theme=gr.themes.Ocean()) as demo:
|
338 |
gr.Markdown("""
|
339 |
<h1 style="font-size: 3em; text-align: center; color: #2E86AB; margin-bottom: 0.5em;">
|
340 |
+
Real-Time Ocean Current Mapper
|
341 |
</h1>
|
342 |
|
343 |
<div style="text-align: center; font-size: 1.2em; margin-bottom: 2em;">
|