✨ feat: 增加打印信息
This commit is contained in:
@@ -129,9 +129,17 @@ async def detect_file(
|
||||
model_name: str,
|
||||
file: UploadFile = File(...)
|
||||
):
|
||||
# 1. 打印 model_name(直接打印字符串即可)
|
||||
print(f"接收到的 model_name: {model_name}")
|
||||
|
||||
# 2. 打印 file 的基本信息(文件名、内容类型等)
|
||||
print(f"文件名: {file.filename}")
|
||||
print(f"文件内容类型: {file.content_type}") # 例如 image/jpeg、text/plain 等
|
||||
"""Detect objects in an uploaded image file"""
|
||||
global model_manager
|
||||
|
||||
|
||||
|
||||
|
||||
if not model_manager:
|
||||
raise HTTPException(status_code=500, detail="Model manager not initialized")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user