|
@@ -2,6 +2,7 @@ from pydantic import BaseModel, field_validator, model_validator, Field
|
|
from typing import List, Optional, Generic, TypeVar
|
|
from typing import List, Optional, Generic, TypeVar
|
|
from utils import base64_to_cv2
|
|
from utils import base64_to_cv2
|
|
from fastapi import FastAPI
|
|
from fastapi import FastAPI
|
|
|
|
+import uvicorn
|
|
|
|
|
|
app = FastAPI()
|
|
app = FastAPI()
|
|
|
|
|
|
@@ -37,4 +38,7 @@ async def detect(item: APIRequest):
|
|
# 大模型检测后如果有违章
|
|
# 大模型检测后如果有违章
|
|
# response["data"]["illegal"] = 1
|
|
# response["data"]["illegal"] = 1
|
|
|
|
|
|
- return response
|
|
|
|
|
|
+ return response
|
|
|
|
+
|
|
|
|
+if __name__ == "__main__":
|
|
|
|
+ uvicorn.run('server:app', host="0.0.0.0", port=18000)
|