Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import gradio as gr
|
| 2 |
+
|
| 3 |
+
# The 'Brain' of your demo
|
| 4 |
+
def analyze_statement(text):
|
| 5 |
+
if "open" in text.lower() and "privacy" in text.lower():
|
| 6 |
+
return "✅ Excellent: This statement shows high ethical commitment."
|
| 7 |
+
elif "data" in text.lower():
|
| 8 |
+
return "🟡 Moderate: Mentions data but lacks transparency details."
|
| 9 |
+
else:
|
| 10 |
+
return "🔴 Low: This statement appears opaque or vague."
|
| 11 |
+
|
| 12 |
+
# The 'Face' of your demo (The UI)
|
| 13 |
+
interface = gr.Interface(
|
| 14 |
+
fn=analyze_statement,
|
| 15 |
+
inputs=gr.Textbox(lines=2, placeholder="Enter a mission statement here..."),
|
| 16 |
+
outputs="text",
|
| 17 |
+
title="OpenEthos Transparency Auditor",
|
| 18 |
+
description="Helping researchers verify the ethical clarity of AI organizations."
|
| 19 |
+
)
|
| 20 |
+
|
| 21 |
+
interface.launch()
|