""" Main application entry point for LangChain-based Multi-Agent System """ import os import sys from pathlib import Path # Add current directory to path sys.path.append(str(Path(__file__).parent)) # Import and create the Gradio interface directly from frontend.gradio_app import PeerToPeerApp, create_gradio_interface # Launch the app if __name__ == "__main__": # Check if we need to run migration first chroma_db_path = Path(__file__).parent / "data" / "chroma_db" if not chroma_db_path.exists(): print("ChromaDB not found. Running migration script...") from scripts.migrate_to_chromadb import main as migrate migrate() print("\nMigration complete! Starting application...\n") # Create and launch the interface app = create_gradio_interface() app.launch( server_name="0.0.0.0", server_port=7860, share=False, show_error=True )