Spaces:
Running on Zero
Running on Zero
File size: 2,828 Bytes
6f8d8d9 bc02199 6f8d8d9 bc02199 6f8d8d9 bc02199 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 | # 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
1. Compete in the "An Adventure in Thousand Token Wood" track.
2. Keep total model parameters <= 32B.
3. Use Gradio for all UI and interaction.
4. Host the final app as a Hugging Face Space.
5. Avoid commercial cloud AI APIs.
6. Maximize hackathon badges.
7. 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
1. Image upload
2. Object understanding
3. Persona generation
4. Secret diary generation
5. Object chat
6. Share card rendering
7. 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.
|