mirror of
https://git.mirrors.martin98.com/https://github.com/bytedance/deer-flow
synced 2025-10-04 19:36:35 +08:00
33 lines
647 B
Python
33 lines
647 B
Python
# Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
|
|
# SPDX-License-Identifier: MIT
|
|
|
|
"""
|
|
Server script for running the Deer API.
|
|
"""
|
|
|
|
import logging
|
|
import sys
|
|
|
|
import uvicorn
|
|
|
|
# Configure logging
|
|
logging.basicConfig(
|
|
level=logging.INFO,
|
|
format="%(asctime)s - %(name)s - %(levelname)s - %(message)s",
|
|
)
|
|
|
|
logger = logging.getLogger(__name__)
|
|
|
|
if __name__ == "__main__":
|
|
logger.info("Starting Deer API server")
|
|
reload = True
|
|
if sys.platform.startswith("win"):
|
|
reload = False
|
|
uvicorn.run(
|
|
"src.server:app",
|
|
host="0.0.0.0",
|
|
port=8000,
|
|
reload=reload,
|
|
log_level="info",
|
|
)
|