from fastapi import FastAPI from fastapi.responses import HTMLResponse from pathlib import Path from .routes import app @app.get("/", response_class=HTMLResponse) async def root(): """Serve an interactive demo page with visualizations.""" ui_path = Path(__file__).parent / "enhanced_ui.html" with open(ui_path, 'r') as f: return f.read() @app.get("/simple", response_class=HTMLResponse) async def simple_demo(): """Serve the original simple demo page.""" return """
A demonstration of context-aware profanity detection and handling for AI-assisted reporting.
Input: "Report on asset: Do You Want to F*** Me Tonight"
Context: Song Title (Entity Name)
Expected Result: Detected but allowed, with transparent feedback about safe rendering.