File size: 937 Bytes
11df203
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
"""
Main Gradio application with MCP server functionality.

This module provides the main entry point for the hf-eda-mcp server,
creating Gradio interfaces for EDA tools and enabling MCP server functionality.
"""

import gradio as gr


def create_gradio_app() -> gr.Blocks:
    """Create and configure the main Gradio application with MCP server."""
    # Placeholder implementation - will be expanded in later tasks
    with gr.Blocks(title="HF EDA MCP Server") as app:
        gr.Markdown("# HuggingFace EDA MCP Server")
        gr.Markdown("MCP server for exploratory data analysis of HuggingFace datasets.")

    return app


def launch_server(port: int = 7860, mcp_server: bool = True) -> None:
    """Launch the Gradio app with MCP server enabled."""
    app = create_gradio_app()

    # Launch with MCP server enabled
    app.launch(server_port=port, share=False, show_error=True)


if __name__ == "__main__":
    launch_server()