WitnessAI / app.py
Gatsby767's picture
Update app.py
57120fe verified
raw
history blame contribute delete
677 Bytes
# app.py
import gradio as gr
from solver import WitnessSolver
from metrics import get_metrics
from scrolls import interpret_scroll
solver = WitnessSolver()
def witness_response(prompt):
response = solver.score_prompt(prompt)
score = solver.covenant_score(response)
return f"🕊️ Response:\n{response}\n\n📜 Covenant Score: {score}"
iface = gr.Interface(
fn=witness_response,
inputs=gr.Textbox(lines=4, placeholder="Enter your ethical or spiritual prompt..."),
outputs="text",
title="Witness AI",
description="Scroll-certified covenantal reasoning powered by R-Zero and divine metrics."
)
if __name__ == "__main__":
iface.launch()