File size: 1,023 Bytes
bca9fd4
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
import gradio as gr
import wattle_guard  # Import your script

def audit_url(url):
    # Run the audit function from your script
    report = wattle_guard.run_audit(url)
    
    # Format the output nicely for the user
    risk_level = report['data_sovereignty']['jurisdiction_risk']
    location = report['data_sovereignty']['physical_location']
    
    # Return a formatted string or JSON
    return f"""
    🇦🇺 WATTLE-GUARD AUDIT REPORT
    -----------------------------
    Target: {report['target']}
    Location: {location}
    Risk Level: {risk_level}
    
    Full Technical Details:
    {report}
    """

# Create the UI
iface = gr.Interface(
    fn=audit_url,
    inputs="text",
    outputs="text",
    title="🇦🇺 Wattle-Guard: Australian Sovereignty Validator",
    description="Enter a URL (e.g., openai.com) to audit it against APP 8 & SOCI Act requirements.",
    examples=["[https://openai.com](https://openai.com)", "[https://www.commbank.com.au](https://www.commbank.com.au)"]
)

iface.launch()