MCPcopy Create free account
hub / github.com/ModelTC/LightX2V / format_model_choice

Function format_model_choice

app/utils/model_utils.py:372–384  ·  view source on GitHub ↗

格式化模型选项,添加下载状态标识

(model_name, model_path, status_emoji=None)

Source from the content-addressed store, hash-verified

370
371
372def format_model_choice(model_name, model_path, status_emoji=None):
373 """格式化模型选项,添加下载状态标识"""
374 if not model_name:
375 return ""
376
377 # 如果提供了状态 emoji,直接使用
378 if status_emoji is not None:
379 return f"{status_emoji} {model_name}"
380
381 # 否则检查本地是否存在
382 exists = check_model_exists(model_path, model_name)
383 emoji = "✅" if exists else "❌"
384 return f"{emoji} {model_name}"
385
386
387def extract_model_name(formatted_name):

Calls 1

check_model_existsFunction · 0.85

Tested by

no test coverage detected