Wattle-Guard / wattle_guard.py
dcata004's picture
Create wattle_guard.py
bca9fd4 verified
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()