CASE / gh-r33drichards-laya-visionSOURCE / GitHub
VARIANT / TYPED-DECISIONS
laya-vision
Image inputs for Laya: calibrated, non-generative typed decisions over images + text (SmolVLM-256M backbone)
中文翻译
中文参考整理中,欢迎补充。
In progress; contributions welcome.21Star
5Fork
可运行代码
import laya
from PIL import Image
agent = laya.load_vlm("thaitea/laya-vision-smolvlm-256m") # downloads from the Hub
result = agent.predict(
{"image": Image.open("photo.jpg"), "note": "customer says it arrived broken"},
{
"damaged": {"type": "noul", "instructions": "Does the item in the photo look damaged?"},
"category": {"type": "choice", "instructions": "What kind of item is this?",
"criteria": ["electronics", "clothing", "furniture", "food", "other"]},
},
)
print(result["answers"]["damaged"]["noul"], result["answers"]["category"]["choice"])用途标签
来源说明
本条为社区整理,仅展示公开来源与链接。代码、文本、头像及商标权利归原作者和原平台所有;Laya 模型归 Convai Innovations 所有。
整理方式:自动采集 · 整理时间:2026年9月22日 14:29