COCODEDE04 commited on
Commit
648b4ca
·
verified ·
1 Parent(s): ebabbd1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -0
app.py CHANGED
@@ -7,6 +7,13 @@ from fastapi import FastAPI, Request
7
  from fastapi.middleware.cors import CORSMiddleware
8
  from fastapi.responses import JSONResponse
9
 
 
 
 
 
 
 
 
10
  # ----------------- CONFIG -----------------
11
  MODEL_PATH = os.getenv("MODEL_PATH", "best_model.h5")
12
  STATS_PATH = os.getenv("STATS_PATH", "means_std.json")
 
7
  from fastapi.middleware.cors import CORSMiddleware
8
  from fastapi.responses import JSONResponse
9
 
10
+
11
+ try:
12
+ import shap
13
+ SHAP_AVAILABLE = True
14
+ except ImportError:
15
+ SHAP_AVAILABLE = False
16
+
17
  # ----------------- CONFIG -----------------
18
  MODEL_PATH = os.getenv("MODEL_PATH", "best_model.h5")
19
  STATS_PATH = os.getenv("STATS_PATH", "means_std.json")