RFTSystems commited on
Commit
d9f0c1c
·
verified ·
1 Parent(s): b2e7c4c

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +25 -0
app.py ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+ import numpy as np
3
+ from fastapi import FastAPI
4
+
5
+ app = FastAPI(title="RFT-Ω Kernel Demo")
6
+
7
+ @app.get("/rft/ping")
8
+ def ping():
9
+ return {"ok": True, "message": "RFT-Ω API online"}
10
+
11
+ @app.get("/rft/metrics")
12
+ def metrics():
13
+ q_omega = float(np.random.uniform(0.82, 0.89))
14
+ z_sync = float(np.random.uniform(0.75, 0.88))
15
+ return {"QΩ": q_omega, "ζ_sync": z_sync}
16
+
17
+ def ui_fn():
18
+ q = float(np.random.uniform(0.82, 0.89))
19
+ z = float(np.random.uniform(0.75, 0.88))
20
+ return f"QΩ={q:.3f} | ζ_sync={z:.3f}"
21
+
22
+ iface = gr.Interface(fn=ui_fn, inputs=[], outputs="text",
23
+ title="RFT-Ω Harmonic Demo",
24
+ description="Endpoints: /rft/ping and /rft/metrics")
25
+ iface.launch()