antonypamo commited on
Commit
4b2d865
·
verified ·
1 Parent(s): 3e4e903

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +11 -2
main.py CHANGED
@@ -80,8 +80,8 @@ def spectral_features(emb: np.ndarray) -> Dict[str, float]:
80
  phi = float(np.clip(total / (total + 1.0), 0.0, 1.0))
81
  omega = float(np.clip(dominant_idx / len(power), 0.0, 1.0))
82
 
83
- S_RRF = float(np.mean(np.diff(power)))
84
- C_RRF = float(power[dominant_idx] / total)
85
 
86
  coherence = float(0.5 * (1.0 - np.std(power) / (np.mean(power) + 1e-12)) + 0.5 * C_RRF)
87
 
@@ -179,6 +179,15 @@ class RerankResponse(BaseModel):
179
  # ============================
180
  # MANIFEST / HEALTH
181
  # ============================
 
 
 
 
 
 
 
 
 
182
 
183
  @app.get("/manifest")
184
  def manifest():
 
80
  phi = float(np.clip(total / (total + 1.0), 0.0, 1.0))
81
  omega = float(np.clip(dominant_idx / len(power), 0.0, 1.0))
82
 
83
+ S_RRF = float(1.0 - np.std(power) / (np.mean(power) + 1e-12))
84
+ S_RRF = float(np.clip(S_RRF, 0.0, 1.0))
85
 
86
  coherence = float(0.5 * (1.0 - np.std(power) / (np.mean(power) + 1e-12)) + 0.5 * C_RRF)
87
 
 
179
  # ============================
180
  # MANIFEST / HEALTH
181
  # ============================
182
+ @app.get("/")
183
+ def root():
184
+ return {
185
+ "status": "ok",
186
+ "model": "RRFSavantMetaLogicV2",
187
+ "version": "Φ12.0",
188
+ "docs": "/docs",
189
+ "endpoints": ["/manifest", "/health", "/evaluate", "/quality", "/v1/rerank"],
190
+ }
191
 
192
  @app.get("/manifest")
193
  def manifest():