| """Stable example objects for the initial mock MVP.""" |
|
|
| EXAMPLE_OBJECTS = [ |
| { |
| "archive_id": "OVD-001", |
| "label": "Coffee mug / 咖啡杯", |
| "description": "old white coffee mug on a developer desk", |
| "mode": "Cynical", |
| "tags": "Everyday · Warmth", |
| }, |
| { |
| "archive_id": "OVD-002", |
| "label": "Mechanical keyboard / 机械键盘", |
| "description": "dusty black mechanical keyboard in an office", |
| "mode": "Philosopher", |
| "tags": "Work · Habit", |
| }, |
| { |
| "archive_id": "OVD-003", |
| "label": "Running shoe / 跑鞋", |
| "description": "worn running shoe near the bedroom door", |
| "mode": "Lonely", |
| "tags": "Journey · Wear", |
| }, |
| { |
| "archive_id": "OVD-004", |
| "label": "Desk lamp / 台灯", |
| "description": "metal desk lamp over late night notes", |
| "mode": "Dramatic", |
| "tags": "Night · Focus", |
| }, |
| { |
| "archive_id": "OVD-005", |
| "label": "Water bottle / 水瓶", |
| "description": "clear plastic water bottle on a kitchen counter", |
| "mode": "Romantic", |
| "tags": "Routine · Clear", |
| }, |
| { |
| "archive_id": "OVD-006", |
| "label": "Notebook / 笔记本", |
| "description": "old notebook of abandoned project ideas", |
| "mode": "Cynical", |
| "tags": "Memory · Drafts", |
| }, |
| ] |
|
|
|
|
| def gradio_examples() -> list[list[str]]: |
| return [[item["description"]] for item in EXAMPLE_OBJECTS] |
|
|
|
|
| def example_button_label(index: int) -> str: |
| item = EXAMPLE_OBJECTS[index] |
| return ( |
| f"{item['archive_id']}\n" |
| f"{item['label']}\n" |
| f"{item['mode']} · {item['tags']}" |
| ) |
|
|