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 """ Context-Aware Profanity Handler - Interactive Demo

🧩 Context-Aware Profanity Handler

A demonstration of context-aware profanity detection and handling for AI-assisted reporting.

💡 Example Use Case

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.

""" if __name__ == "__main__": import uvicorn uvicorn.run(app, host="0.0.0.0", port=8000)