umer6016 commited on
Commit
0504309
Β·
verified Β·
1 Parent(s): 15ebc49

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. streamlit_app.py +17 -1
streamlit_app.py CHANGED
@@ -47,7 +47,7 @@ def send_discord_notification(symbol, price, change_percent, prediction_dir):
47
  pred_emoji = "🟒" if "UP" in prediction_dir else "πŸ”΄"
48
 
49
  # Format the message string
50
- message = (f"**Hourly Stock Update** πŸ•’\n"
51
  f"**{symbol}**: ${price:.2f} {emoji} ({change_percent:.2f}%)\n"
52
  f"**AI Prediction:** {prediction_dir} {pred_emoji}")
53
 
@@ -141,6 +141,22 @@ if st.sidebar.button("πŸ”„ Refresh Data"):
141
  st.cache_data.clear() # Clear cache to force update
142
  st.rerun()
143
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
144
  # --- Main Logic ---
145
 
146
  # 1. Fetch Data
 
47
  pred_emoji = "🟒" if "UP" in prediction_dir else "πŸ”΄"
48
 
49
  # Format the message string
50
+ message = (f"**Stock Update** πŸ•’\n"
51
  f"**{symbol}**: ${price:.2f} {emoji} ({change_percent:.2f}%)\n"
52
  f"**AI Prediction:** {prediction_dir} {pred_emoji}")
53
 
 
141
  st.cache_data.clear() # Clear cache to force update
142
  st.rerun()
143
 
144
+ # --- Debugging Status (Sidebar) ---
145
+ st.sidebar.markdown("---")
146
+ st.sidebar.subheader("πŸ› οΈ System Status")
147
+
148
+ # Check Webhook
149
+ if WEBHOOK_URL:
150
+ st.sidebar.success(f"Discord Webhook: Configured (Ends in ...{WEBHOOK_URL[-4:]})")
151
+ else:
152
+ st.sidebar.error("Discord Webhook: Missing ❌")
153
+
154
+ # Check Alpha Vantage
155
+ if ALPHA_VANTAGE_KEY:
156
+ st.sidebar.success("Alpha Vantage: Configured βœ…")
157
+ else:
158
+ st.sidebar.warning("Alpha Vantage: Missing ⚠️ (Using Mock Data)")
159
+
160
  # --- Main Logic ---
161
 
162
  # 1. Fetch Data