fix: silence false-positive ruff lint warnings in Python scripts

This commit is contained in:
Warren
2026-03-25 14:55:30 +08:00
parent 383201cacd
commit 845704724f
2 changed files with 4 additions and 4 deletions

View File

@@ -82,9 +82,9 @@ def generate_caption_with_llava(
"""Generate caption using LLaVA model""" """Generate caption using LLaVA model"""
try: try:
# Try to use transformers with LLaVA # Try to use transformers with LLaVA
from transformers import AutoProcessor, AutoModelForVision2Seq from transformers import AutoProcessor, AutoModelForVision2Seq # noqa: F401
import torch import torch # noqa: F401
from PIL import Image from PIL import Image # noqa: F401
# Note: This requires llava-hf/llava-1.5-7b-hf or similar # Note: This requires llava-hf/llava-1.5-7b-hf or similar
# For now, return a placeholder # For now, return a placeholder

View File

@@ -63,7 +63,7 @@ def generate_parent_child_chunks(
asr_segments = asr_data.get("segments", []) asr_segments = asr_data.get("segments", [])
cut_scenes = cut_data.get("scenes", []) cut_scenes = cut_data.get("scenes", [])
yolo_frames = yolo_data.get("frames", []) yolo_frames = yolo_data.get("frames", [])
ocr_frames = ocr_data.get("frames", []) _ocr_frames = ocr_data.get("frames", [])
# Create child chunks from ASR segments # Create child chunks from ASR segments
asr_child_ids = [] asr_child_ids = []