File size: 1,098 Bytes
f6f24f7
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
32
33
34
35
36
37
38
#!/usr/bin/env python3
"""
Job Search MCP Server - Hugging Face Spaces Entry Point

This is the entry point for running the Job Search MCP Server on Hugging Face Spaces.
It imports and launches the main application with MCP server capabilities.
"""

import os
import sys

# Add the project root to Python path
sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)))

from main import create_gradio_interface, mcp_server


def main():
    """Launch the Job Search MCP Server on Hugging Face Spaces."""
    print("πŸš€ Starting Job Search MCP Server on Hugging Face Spaces...")

    # Create the Gradio interface
    demo = create_gradio_interface()

    # Launch with settings optimized for Hugging Face Spaces
    demo.launch(
        server_name="0.0.0.0",  # Allow external connections
        server_port=7860,  # Default HF Spaces port
        mcp_server=True,  # Enable MCP server functionality
        share=False,  # Don't create gradio.live link
        show_error=True,  # Show detailed errors
        quiet=False,  # Show startup logs
    )


if __name__ == "__main__":
    main()