ysharma's picture
ysharma HF Staff
Update app.py
f3fb8fa verified
raw
history blame
1.15 kB
"""
Universal MCP Client - Main Application
A modular Gradio chatbot that uses either Anthropic Claude API or HuggingFace Inference Providers
to access various LLMs and can connect to MCP servers for enhanced functionality.
"""
import logging
from config import AppConfig
from mcp_client import UniversalMCPClient
from ui_components import UIComponents
# Set up logging
logger = logging.getLogger(__name__)
def main():
"""Main application entry point"""
logger.info("🚀 Starting Universal Multimodal MCP Chatbot Client...")
try:
# Initialize the MCP client
mcp_client = UniversalMCPClient()
# Create UI components
ui_components = UIComponents(mcp_client)
# Create the Gradio interface
demo = ui_components.create_interface()
# Launch the application
demo.launch(debug=AppConfig.DEBUG_MODE)
logger.info("✅ Universal Multimodal MCP Chatbot Client started successfully!")
except Exception as e:
logger.error(f"❌ Failed to start application: {e}")
raise
if __name__ == "__main__":
main()