更新一些部署相关的更改
This commit is contained in:
parent
e04add5bc2
commit
c84fa50ef2
@ -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"]
|
||||
|
||||
@ -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)
|
||||
|
||||
5
test/data/A_Dream_of_Red_Mansions_tiny.jsonl
Normal file
5
test/data/A_Dream_of_Red_Mansions_tiny.jsonl
Normal file
@ -0,0 +1,5 @@
|
||||
{"h": "贾代善", "t": "贾源", "r": "子"}
|
||||
{"h": "娄氏", "t": "贾源", "r": "重孙媳妇"}
|
||||
{"h": "贾母", "t": "贾代善", "r": "妻"}
|
||||
{"h": "老姨奶奶", "t": "贾代善", "r": "妾"}
|
||||
{"h": "贾敏", "t": "贾代善", "r": "女"}
|
||||
@ -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/, '')
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user