File size: 744 Bytes
ae8a479
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import gradio as gr

# The 'Brain' of your demo
def analyze_statement(text):
    if "open" in text.lower() and "privacy" in text.lower():
        return "βœ… Excellent: This statement shows high ethical commitment."
    elif "data" in text.lower():
        return "🟑 Moderate: Mentions data but lacks transparency details."
    else:
        return "πŸ”΄ Low: This statement appears opaque or vague."

# The 'Face' of your demo (The UI)
interface = gr.Interface(
    fn=analyze_statement,
    inputs=gr.Textbox(lines=2, placeholder="Enter a mission statement here..."),
    outputs="text",
    title="OpenEthos Transparency Auditor",
    description="Helping researchers verify the ethical clarity of AI organizations."
)

interface.launch()