25 lines
391 B
Python
25 lines
391 B
Python
from fastapi import FastAPI
|
|
from api import router
|
|
from settings import settings
|
|
|
|
|
|
app = FastAPI(
|
|
title="JEmbedding",
|
|
description="文本向量化服务",
|
|
version="1.0.0"
|
|
)
|
|
|
|
app.include_router(router)
|
|
|
|
|
|
if __name__ == "__main__":
|
|
import uvicorn
|
|
uvicorn.run(
|
|
"app:app",
|
|
host=settings.host,
|
|
port=settings.port,
|
|
reload=settings.debug
|
|
)
|
|
|
|
|