更新一些部署相关的更改

This commit is contained in:
Wenjie Zhang 2025-02-28 00:26:57 +08:00
parent e04add5bc2
commit c84fa50ef2
4 changed files with 10 additions and 3 deletions

View File

@ -4,7 +4,7 @@ import yaml
from pathlib import Path
from src.utils.logging_config import logger
with open(Path("src/static/models.yaml"), "r") as f:
with open(Path("src/static/models.yaml"), 'r', encoding='utf-8') as f:
_models = yaml.safe_load(f)
MODEL_NAMES = _models["MODEL_NAMES"]

View File

@ -1,11 +1,13 @@
import uvicorn
from dotenv import load_dotenv
load_dotenv("src/.env")
from fastapi import FastAPI
from fastapi.middleware.cors import CORSMiddleware
from src.routers import router
from src.utils.logging_config import logger
load_dotenv()
app = FastAPI()
app.include_router(router)

View File

@ -0,0 +1,5 @@
{"h": "贾代善", "t": "贾源", "r": "子"}
{"h": "娄氏", "t": "贾源", "r": "重孙媳妇"}
{"h": "贾母", "t": "贾代善", "r": "妻"}
{"h": "老姨奶奶", "t": "贾代善", "r": "妾"}
{"h": "贾敏", "t": "贾代善", "r": "女"}

View File

@ -14,7 +14,7 @@ export default defineConfig(({ mode }) => {
server: {
proxy: {
'^/api': {
target: env.VITE_API_URL || 'http://localhost:5000',
target: env.VITE_API_URL || 'http://localhost:5050',
changeOrigin: true,
rewrite: (path) => path.replace(/^\/api/, '')
}