File size: 555 Bytes
561a1cf |
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 |
import sys
import logging
from pathlib import Path
# Configure logging
logging.basicConfig(
level=logging.DEBUG,
format='%(asctime)s - %(name)s - %(levelname)s - %(message)s',
handlers=[
logging.StreamHandler(sys.stdout)
]
)
# Add parent directory to PYTHONPATH
sys.path.append(str(Path(__file__).resolve().parent.parent))
from app import ModelAPI
logger = logging.getLogger(__name__)
logger.setLevel(logging.DEBUG)
logger.info("Starting ModelAPI server...")
api = ModelAPI(
host = "0.0.0.0",
port = 6500
)
api.run() |