优化代码风格

This commit is contained in:
ZZX9599
2025-09-15 17:47:38 +08:00
parent 5959f9994c
commit a95074feca
2 changed files with 2 additions and 8 deletions

View File

@ -1,18 +1,13 @@
from PIL import Image
import numpy as np
import uvicorn
import threading
import time
import os
from fastapi import FastAPI
# 新增:导入 CORS 相关依赖
from fastapi.middleware.cors import CORSMiddleware
# 导入 Flask 服务实例
from app import app as flask_app
from service.file_service import app as flask_app
# 原有业务导入
from core.all import load_model, detect
from core.all import load_model
from ds.config import SERVER_CONFIG
from middle.error_handler import global_exception_handler
from service.user_service import router as user_router

View File

@ -3,7 +3,6 @@ import os
import logging
from functools import wraps
from pathlib import Path
# 跨域依赖必须安装pip install flask-cors
from flask_cors import CORS
# 配置日志(保持原有格式)