This commit is contained in:
parent
aa5c7a999a
commit
ed593ed6d3
2 changed files with 6 additions and 6 deletions
|
|
@ -21,7 +21,7 @@ repos:
|
|||
- id: trailing-whitespace
|
||||
|
||||
- repo: https://github.com/astral-sh/ruff-pre-commit
|
||||
rev: v0.15.6
|
||||
rev: v0.15.15
|
||||
hooks:
|
||||
- id: ruff-check
|
||||
args: ["--fix", "--exit-non-zero-on-fix"]
|
||||
|
|
@ -34,6 +34,6 @@ repos:
|
|||
args: ["--py311-plus"]
|
||||
|
||||
- repo: https://github.com/rhysd/actionlint
|
||||
rev: v1.7.11
|
||||
rev: v1.7.12
|
||||
hooks:
|
||||
- id: actionlint
|
||||
|
|
|
|||
8
main.py
8
main.py
|
|
@ -92,7 +92,7 @@ openai_settings: OpenAIResponsesModelSettings = OpenAIResponsesModelSettings(
|
|||
openai_text_verbosity="low",
|
||||
)
|
||||
chatgpt_agent: Agent[BotDependencies, str] = Agent(
|
||||
model="openai:gpt-5-chat-latest",
|
||||
model="deepseek:deepseek-v4-flash",
|
||||
deps_type=BotDependencies,
|
||||
model_settings=openai_settings,
|
||||
)
|
||||
|
|
@ -1113,7 +1113,7 @@ def enhance_image1(image: bytes) -> bytes:
|
|||
"""
|
||||
# Read the image
|
||||
nparr: ImageType = np.frombuffer(image, np.uint8)
|
||||
img_np: ImageType = cv2.imdecode(nparr, cv2.IMREAD_COLOR)
|
||||
img_np: ImageType = cv2.imdecode(nparr, cv2.IMREAD_COLOR) # pyright: ignore[reportAssignmentType]
|
||||
|
||||
# Denoise the image with conservative settings
|
||||
img_np = cv2.fastNlMeansDenoisingColored(img_np, None, 5, 5, 7, 21)
|
||||
|
|
@ -1150,7 +1150,7 @@ def enhance_image2(image: bytes) -> bytes:
|
|||
"""
|
||||
# Read the image
|
||||
nparr: ImageType = np.frombuffer(image, np.uint8)
|
||||
img_np: ImageType = cv2.imdecode(nparr, cv2.IMREAD_COLOR)
|
||||
img_np: ImageType = cv2.imdecode(nparr, cv2.IMREAD_COLOR) # pyright: ignore[reportAssignmentType]
|
||||
|
||||
# Denoise the image with conservative settings
|
||||
img_np = cv2.fastNlMeansDenoisingColored(img_np, None, 5, 5, 7, 21)
|
||||
|
|
@ -1194,7 +1194,7 @@ def enhance_image3(image: bytes) -> bytes:
|
|||
"""
|
||||
# Read the image
|
||||
nparr: ImageType = np.frombuffer(image, np.uint8)
|
||||
img_np: ImageType = cv2.imdecode(nparr, cv2.IMREAD_COLOR)
|
||||
img_np: ImageType = cv2.imdecode(nparr, cv2.IMREAD_COLOR) # pyright: ignore[reportAssignmentType]
|
||||
|
||||
# Denoise the image with conservative settings
|
||||
img_np = cv2.fastNlMeansDenoisingColored(img_np, None, 5, 5, 7, 21)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue