Spaces:
Running on Zero
A newer version of the Gradio SDK is available: 6.17.3
AGENTS.md
Project
Objectverse Diary is a Build Small Hackathon project. It is an English-first, Chinese-second Gradio application where users upload everyday object photos and small AI models generate secret object personas, diary entries, conversations, and shareable cards.
Primary Goals
- Compete in the "An Adventure in Thousand Token Wood" track.
- Keep total model parameters <= 32B.
- Use Gradio for all UI and interaction.
- Host the final app as a Hugging Face Space.
- Avoid commercial cloud AI APIs.
- Maximize hackathon badges.
- Use English as the main UI language and Chinese as secondary helper text.
Non-Negotiable Rules
- Do not use OpenAI, Anthropic, Gemini, Cohere, or other commercial model APIs.
- Do not leak private credit codes, tokens, emails, or credentials.
- Do not hardcode secrets.
- Do not remove Gradio.
- Do not make the UI Chinese-first.
- Do not exceed the 32B total model parameter limit.
- Do not add large features that risk missing the submission deadline.
- Do not store unconsented personal user data.
Tech Stack
- Python
- Gradio Blocks
- Hugging Face Spaces
- llama.cpp / llama-cpp-python for text generation
- MiniCPM-V or fallback lightweight VLM for object understanding
- LoRA / PEFT for fine-tuning
- Markdown documentation
UI Requirements
The interface must be English-first and Chinese-second.
Visual style: strange object archive, not default Gradio demo.
Recommended UI mood: mysterious archive, typewriter diary, warm dark paper, amber highlight, museum label, strange but polished.
When developing or polishing the frontend UI, reference the design images under UI 参考/, but keep product scope, copy hierarchy, interaction flow, and technical constraints aligned with docs/.
Architecture
- Image upload
- Object understanding
- Persona generation
- Secret diary generation
- Object chat
- Share card rendering
- Trace export
Coding Guidelines
- Use type hints.
- Prefer small, composable functions.
- Prompts belong under
src/prompts/. - UI copy belongs under
src/ui/copy.py. - CSS belongs under
src/ui/styles.css. - Runtime code belongs under
src/models/. - Trace code belongs under
src/traces/. - Use Pydantic schemas for model outputs.
- Add clear fallback behavior when model output is invalid.
Testing Requirements
- App runs locally.
- App runs on HF Space.
- At least 6 sample objects work.
- Share card renders correctly.
- Trace export works.
- No secret keys committed.
- README links valid.
- Demo video flow reproducible.
Current Implementation Boundary
The current phase is an initial mock MVP. It may use deterministic mock outputs for Day 2 flow validation.
Real MiniCPM-V, llama.cpp, LoRA fine-tuning, dataset publishing, and Hugging Face Space deployment are not connected yet.