Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -222,20 +222,20 @@ class OceanCurrentMapper:
|
|
222 |
conditions = []
|
223 |
|
224 |
if avg_speed < 0.3:
|
225 |
-
conditions.append("
|
226 |
elif avg_speed < 0.8:
|
227 |
-
conditions.append("
|
228 |
else:
|
229 |
-
conditions.append("
|
230 |
|
231 |
if max_speed > 1.0:
|
232 |
-
conditions.append("
|
233 |
|
234 |
# Add mock weather conditions
|
235 |
conditions.extend([
|
236 |
-
f"
|
237 |
-
f"
|
238 |
-
f"
|
239 |
])
|
240 |
|
241 |
return "\n".join(conditions)
|
@@ -254,9 +254,9 @@ def analyze_conditions(region):
|
|
254 |
return mapper.analyze_surfing_conditions(region)
|
255 |
|
256 |
# Define the Gradio interface
|
257 |
-
with gr.Blocks(title="Ocean Current
|
258 |
gr.Markdown("""
|
259 |
-
#
|
260 |
|
261 |
An AI-powered application for visualizing ocean currents, designed for oceanographers and surfers.
|
262 |
|
|
|
222 |
conditions = []
|
223 |
|
224 |
if avg_speed < 0.3:
|
225 |
+
conditions.append("Low current speeds - good for beginners")
|
226 |
elif avg_speed < 0.8:
|
227 |
+
conditions.append("Moderate currents - suitable for intermediate surfers")
|
228 |
else:
|
229 |
+
conditions.append("Strong currents - experienced surfers only")
|
230 |
|
231 |
if max_speed > 1.0:
|
232 |
+
conditions.append("Strong rip currents detected in some areas")
|
233 |
|
234 |
# Add mock weather conditions
|
235 |
conditions.extend([
|
236 |
+
f"Water temperature: {20 + np.random.randint(0, 10)}Β°C",
|
237 |
+
f"Wind: {5 + np.random.randint(0, 15)} mph offshore",
|
238 |
+
f"Wave height: {1 + np.random.randint(0, 3)} meters"
|
239 |
])
|
240 |
|
241 |
return "\n".join(conditions)
|
|
|
254 |
return mapper.analyze_surfing_conditions(region)
|
255 |
|
256 |
# Define the Gradio interface
|
257 |
+
with gr.Blocks(title="Ocean Current Mapping Tool", theme=gr.themes.Ocean()) as demo:
|
258 |
gr.Markdown("""
|
259 |
+
#Real-Time Ocean Current Mapper
|
260 |
|
261 |
An AI-powered application for visualizing ocean currents, designed for oceanographers and surfers.
|
262 |
|