Spaces:
Sleeping
Sleeping
Upload monitor.py
Browse files- monitor.py +7 -3
monitor.py
CHANGED
|
@@ -7,6 +7,7 @@ import sys
|
|
| 7 |
import os
|
| 8 |
import time
|
| 9 |
from datetime import datetime
|
|
|
|
| 10 |
|
| 11 |
# --- SETUP PATHS ---
|
| 12 |
project_root = os.path.dirname(os.path.abspath(__file__))
|
|
@@ -119,7 +120,7 @@ def plot_quantum_cloud(real_window, futures):
|
|
| 119 |
fig.add_trace(go.Scatter(
|
| 120 |
x=x_future, y=aligned_mean,
|
| 121 |
mode='lines',
|
| 122 |
-
name='Quantum Trend',
|
| 123 |
line=dict(color='#ff00ff', width=3, dash='dot')
|
| 124 |
))
|
| 125 |
|
|
@@ -205,12 +206,15 @@ def main():
|
|
| 205 |
box_color = "#ff0000" # Bright Red
|
| 206 |
|
| 207 |
# --- E. RENDER UI ---
|
|
|
|
|
|
|
|
|
|
| 208 |
|
| 209 |
# 1. Status Box
|
| 210 |
status_area.markdown(f"""
|
| 211 |
<div class="status-box" style="background-color: {box_color};">
|
| 212 |
<h1 style="margin:0; color:white;">{final_status}</h1>
|
| 213 |
-
<p style="margin:0; color:#ddd;">Market Health Score: {critic_score:.4f} | Time: {
|
| 214 |
</div>
|
| 215 |
""", unsafe_allow_html=True)
|
| 216 |
|
|
@@ -228,7 +232,7 @@ def main():
|
|
| 228 |
chart_area.plotly_chart(fig, use_container_width=True)
|
| 229 |
|
| 230 |
# 4. Logs
|
| 231 |
-
ts =
|
| 232 |
log_entry = f"[{ts}] {instant_signal:<8} | Trend: {trend:+.4f} | Score: {critic_score:.4f}"
|
| 233 |
st.session_state.logs.insert(0, log_entry)
|
| 234 |
if len(st.session_state.logs) > 8: st.session_state.logs.pop()
|
|
|
|
| 7 |
import os
|
| 8 |
import time
|
| 9 |
from datetime import datetime
|
| 10 |
+
from zoneinfo import ZoneInfo
|
| 11 |
|
| 12 |
# --- SETUP PATHS ---
|
| 13 |
project_root = os.path.dirname(os.path.abspath(__file__))
|
|
|
|
| 120 |
fig.add_trace(go.Scatter(
|
| 121 |
x=x_future, y=aligned_mean,
|
| 122 |
mode='lines',
|
| 123 |
+
name='Averaged Quantum Trend (2SD)',
|
| 124 |
line=dict(color='#ff00ff', width=3, dash='dot')
|
| 125 |
))
|
| 126 |
|
|
|
|
| 206 |
box_color = "#ff0000" # Bright Red
|
| 207 |
|
| 208 |
# --- E. RENDER UI ---
|
| 209 |
+
# Current Eastern Time (handles EST/EDT automatically)
|
| 210 |
+
est_now = datetime.now(ZoneInfo("America/New_York"))
|
| 211 |
+
est_stamp = est_now.strftime("%Y-%m-%d %H:%M:%S %Z")
|
| 212 |
|
| 213 |
# 1. Status Box
|
| 214 |
status_area.markdown(f"""
|
| 215 |
<div class="status-box" style="background-color: {box_color};">
|
| 216 |
<h1 style="margin:0; color:white;">{final_status}</h1>
|
| 217 |
+
<p style="margin:0; color:#ddd;">Market Health Score: {critic_score:.4f} | Time (ET): {est_stamp}</p>
|
| 218 |
</div>
|
| 219 |
""", unsafe_allow_html=True)
|
| 220 |
|
|
|
|
| 232 |
chart_area.plotly_chart(fig, use_container_width=True)
|
| 233 |
|
| 234 |
# 4. Logs
|
| 235 |
+
ts = est_stamp
|
| 236 |
log_entry = f"[{ts}] {instant_signal:<8} | Trend: {trend:+.4f} | Score: {critic_score:.4f}"
|
| 237 |
st.session_state.logs.insert(0, log_entry)
|
| 238 |
if len(st.session_state.logs) > 8: st.session_state.logs.pop()
|