Evgueni Poloukarov commited on
Commit
7ff8b4c
·
1 Parent(s): a6a4bc3

debug: add diagnostic logging to app.py for Space deployment

Browse files
Files changed (1) hide show
  1. app.py +17 -1
app.py CHANGED
@@ -4,10 +4,24 @@ FBMC Chronos-2 Forecasting API
4
  HuggingFace Space Gradio Interface
5
  """
6
 
 
 
 
 
7
  import gradio as gr
8
  import os
9
  from datetime import datetime
10
- from src.forecasting.chronos_inference import run_inference
 
 
 
 
 
 
 
 
 
 
11
 
12
 
13
  # Global configuration
@@ -16,6 +30,8 @@ FORECAST_TYPES = {
16
  "full_14day": "Full Forecast (All borders × 14 days)"
17
  }
18
 
 
 
19
 
20
  def forecast_api(run_date_str, forecast_type):
21
  """
 
4
  HuggingFace Space Gradio Interface
5
  """
6
 
7
+ import sys
8
+ print(f"[STARTUP] Python version: {sys.version}", flush=True)
9
+ print(f"[STARTUP] Python path: {sys.path[:3]}", flush=True)
10
+
11
  import gradio as gr
12
  import os
13
  from datetime import datetime
14
+
15
+ print("[STARTUP] Basic imports successful", flush=True)
16
+
17
+ try:
18
+ from src.forecasting.chronos_inference import run_inference
19
+ print("[STARTUP] chronos_inference import successful", flush=True)
20
+ except Exception as e:
21
+ print(f"[ERROR] Failed to import chronos_inference: {e}", flush=True)
22
+ import traceback
23
+ traceback.print_exc()
24
+ run_inference = None
25
 
26
 
27
  # Global configuration
 
30
  "full_14day": "Full Forecast (All borders × 14 days)"
31
  }
32
 
33
+ print("[STARTUP] Configuration loaded", flush=True)
34
+
35
 
36
  def forecast_api(run_date_str, forecast_type):
37
  """