Skip to content

Commit 495b0c7

Browse files
Update gradio_demo.py
1 parent cb0512c commit 495b0c7

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

gradio_demo.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,18 @@
11
from z3 import Solver, Bool, sat
22

3-
def audit(prompt: str) -> str:
3+
def _toy_penguin_sat(prompt: str) -> str:
44
s = Solver()
55
x = Bool("penguin_on_ice")
66
want = "penguin on ice" in (prompt or "").lower()
77
s.add(x == want)
8-
result = "sat" if s.check() == sat else "unsat"
9-
return f"Result: {result}\nFuel=1.00 Temporal=0.80 Relational=0.75 Ethics=0.95 Embodiment=0.60"
8+
return "sat" if s.check() == sat else "unsat"
9+
10+
def audit(prompt: str) -> str:
11+
result = _toy_penguin_sat(prompt)
12+
# fixed stable stub numbers
13+
line1 = f"Result: {result}"
14+
line2 = "Fuel=1.00 Temporal=0.80 Relational=0.75 Ethics=0.95 Embodiment=0.60"
15+
return f"{line1}\n{line2}"
1016

1117
def build_demo():
1218
import gradio as gr

0 commit comments

Comments
 (0)