Forgot to remove that
Build, push image, and notify Watchtower / build-image (push) Successful in 1m19s
Build, push image, and notify Watchtower / notify (push) Successful in 13s

This commit is contained in:
2026-08-23 12:39:44 +02:00
parent a769efa8e0
commit 9562bb7315
-17
View File
@@ -2,7 +2,6 @@ import json
from pydantic import BaseModel, Field
from APIs.aichat import generate
import shared.config as config
from PIL import Image, ImageEnhance
class UtensilMaterialCheck(BaseModel):
object_name: str = Field(
@@ -29,22 +28,6 @@ class DishSafetyResult(BaseModel):
description="If is_safe is False, set to 'REMOVE METAL UTENSIL OR FOIL BEFORE MICROWAVING'. Otherwise empty ''."
)
def preprocess_dish_image(image_path: str) -> str:
"""Brightens dark areas and sharpens food texture for small vision models."""
img = Image.open(image_path)
# 1. Boost brightness slightly
enhancer = ImageEnhance.Brightness(img)
img = enhancer.enhance(1.4)
# 2. Boost contrast to separate food shapes from dark shadows
enhancer = ImageEnhance.Contrast(img)
img = enhancer.enhance(1.3)
processed_path = "/tmp/processed_dish.jpg"
img.save(processed_path, quality=85)
return processed_path
def check_dish_safety(image_path: str) -> dict:
prompt = (
"Analyze this microwave dish image strictly for EQUIPMENT DAMAGE HAZARDS (Metal, Steel, Aluminum Foil).\n\n"