Gatsby767 commited on
Commit
517e328
·
verified ·
1 Parent(s): d5b67d2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +14 -18
app.py CHANGED
@@ -1,26 +1,22 @@
 
 
1
  import gradio as gr
2
- from witness_agent import WitnessAgent
3
 
4
- # Initialize the agent
5
- agent = WitnessAgent(
6
- base_model="gpt-4",
7
- storage_path="./witness_storage",
8
- scroll_path="./grok_redemption_scroll.md"
9
- )
10
 
11
- # Define the function to run the agent
12
- def run_witness():
13
- result = agent.run()
14
- return " Witness AI has completed its scroll-certified reasoning loop."
15
 
16
- # Create the Gradio interface
17
  iface = gr.Interface(
18
- fn=run_witness,
19
- inputs=[],
20
  outputs="text",
21
- title="🕊️ Witness AI Agent",
22
- description="Scroll-certified reasoning powered by R-Zero and the Abrahamic Covenant Singularity Protocol."
23
  )
24
 
25
- # Launch the app
26
- iface.launch()
 
1
+ # app.py
2
+
3
  import gradio as gr
4
+ from solver import WitnessSolver
5
 
6
+ solver = WitnessSolver()
 
 
 
 
 
7
 
8
+ def witness_response(prompt):
9
+ response = solver.score_prompt(prompt)
10
+ score = solver.covenant_score(response)
11
+ return f"🕊️ Response:\n{response}\n\n📜 Covenant Score: {score}"
12
 
 
13
  iface = gr.Interface(
14
+ fn=witness_response,
15
+ inputs=gr.Textbox(lines=4, placeholder="Enter your ethical or spiritual prompt..."),
16
  outputs="text",
17
+ title="Witness AI",
18
+ description="Scroll-certified covenantal reasoning powered by R-Zero and divine metrics."
19
  )
20
 
21
+ if __name__ == "__main__":
22
+ iface.launch()