-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun_offline_blackbox.py
More file actions
30 lines (22 loc) · 913 Bytes
/
Copy pathrun_offline_blackbox.py
File metadata and controls
30 lines (22 loc) · 913 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# path: BitNet-mlx/run_offline_blackbox.py
import uvicorn
from fastapi import FastAPI
from pydantic import BaseModel
from typing import List
from src.inference.proprietary_blackbox import SovereignBitNetInference
app = FastAPI(title="JCLLC BitNet-MLX Proprietary Blackbox")
engine = SovereignBitNetInference()
class TensorPayload(BaseModel):
ticker: str
spatial_tensor: List[List[float]] # Expected shape: (1, T)
@app.post("/v1/proprietary/infer")
async def execute_inference(payload: TensorPayload):
"""
Ingests the raw 2D spatial tensor.
Returns the computed KPZ/SVD manifold state and 1.58-bit text consensus.
"""
result = engine.generate_consensus(payload.ticker, payload.spatial_tensor)
return result
if __name__ == "__main__":
# Binds strictly to localhost to prevent external subnet access
uvicorn.run(app, host="127.0.0.1", port=8001, log_level="warning")