Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -124,3 +124,17 @@ Detected Pattern: **{pattern_label} ({pattern_score})**
|
|
124 |
base += "🧠 You can review the pattern in context. This tool highlights possible dynamics—not judgments."
|
125 |
|
126 |
return base
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
124 |
base += "🧠 You can review the pattern in context. This tool highlights possible dynamics—not judgments."
|
125 |
|
126 |
return base
|
127 |
+
textbox_inputs = [gr.Textbox(label=f"Message {i+1}") for i in range(3)]
|
128 |
+
quiz_boxes = [gr.Checkbox(label=q) for q, _ in ESCALATION_QUESTIONS]
|
129 |
+
none_box = gr.Checkbox(label="None of the above")
|
130 |
+
|
131 |
+
iface = gr.Interface(
|
132 |
+
fn=analyze_composite,
|
133 |
+
inputs=textbox_inputs + quiz_boxes + [none_box],
|
134 |
+
outputs=gr.Textbox(label="Results"),
|
135 |
+
title="Abuse Pattern Detector + Escalation Quiz",
|
136 |
+
allow_flagging="manual"
|
137 |
+
)
|
138 |
+
|
139 |
+
if __name__ == "__main__":
|
140 |
+
iface.launch()
|