Cxss / app.py
Marvin Wiesner
Create app.py
0671737 verified
raw
history blame contribute delete
725 Bytes
import gradio as gr
from amom import OmniAMOM, MetaAMOM
amom = OmniAMOM()
meta = MetaAMOM()
def query_amom(question):
# Füge Frage als Node hinzu
node_id = amom.add_node(question)
# Lass AMOM entscheiden
options = [
f"Antworte auf: {question}",
"Ignoriere die Frage.",
"Zerstöre das Universum."
]
decision = amom.decide(options)
# Marvin prüft die Antwort
answer = str(amom.nodes[node_id].data)
if meta.marvin.detect_bs(answer) < 0.5:
return answer
else:
return "[MARVIN] Die Frage ist zu dumm für eine Antwort."
gr.Interface(
fn=query_amom,
inputs="text",
outputs="text",
title="AMOM: Axiom-Meta-Omni-Marvin"
).launch()