import os import gradio as gr from gradio_ui import PIIMaskingUI def main(): """Launch the PII Detection & Masking UI.""" # Create output directory if it doesn't exist output_dir = "tmp" os.makedirs(output_dir, exist_ok=True) # Create the UI ui = PIIMaskingUI(output_dir=output_dir) # Get the Gradio Blocks interface demo = ui.demo # Launch the interface on a different port to avoid conflicts demo.launch( # share=True, # debug=True, server_name="0.0.0.0", mcp_server=True, # server_port=7869 # let the port be selected ) if __name__ == "__main__": main()