How krishank-kureti/framekraft works
FrameKraft turns an uploaded image and user-supplied mood and editing vibe into ranked image captions, mood-stylized caption options, an edited image, and matching song previews. The documented web flow enters through FastAPI; its pipeline orchestrator invokes captioning, classification, stylization, editing, and music recommendation stages. The CLI is a separate entry point with a similar workflow. README describes the frontend experience, while the tree contains only frontend/index.html; unsampled frontend behavior and some backend modules are represented only where documentation supports them.
Main entry points: pipeline.py Image pipeline · Start.py Interactive CLI · MusicRag.py Music RAG · index.html FrameKraft UI
Components 18
Web application
- FrameKraft UI
frontend/index.html - FastAPI service
backend/app/main.py - Pipeline endpoint
backend/app/api/pipeline.py - Image pipeline
backend/app/core/pipeline.py - Image utilities
backend/app/utils/image.py
Image understanding and editing
- BLIP captioning
backend/Blip.py - CLIP ranking
backend/Clip.py - Caption stylization
backend/Start.py - Edit command generation
backend/CvEdit.py - OpenCV editor
backend/CvEdit.py
Music recommendations
- Music RAG
backend/MusicRag.py - Song index
backend/data/chroma_db - Song database encoder
backend/MusicEncoder.py - Preview lookup
backend/MusicSources.py
CLI workflow
- Interactive CLI
backend/Start.py
Other components
- Image user
- Groq API
- iTunes previews
Connections 23
- Image user → FrameKraft UI: uses
- FrameKraft UI → FastAPI service: requests page
- FrameKraft UI → Pipeline endpoint: uploads image
- FastAPI service → Pipeline endpoint: registers route
- Pipeline endpoint → Image pipeline: invokes pipeline
- Image pipeline → BLIP captioning: generates captions
- Image pipeline → CLIP ranking: ranks captions
- Image pipeline → Caption stylization: styles caption
- Image pipeline → Edit command generation: requests edits
- Image pipeline → OpenCV editor: applies edits
- Image pipeline → Music RAG: requests songs
- Caption stylization → Groq API: calls model
- Edit command generation → Groq API: calls model
- Music RAG → Groq API: extracts tags
- Music RAG → Song index: queries index
- Music RAG → Preview lookup: looks up previews
- Preview lookup → iTunes previews: fetches previews
- Song database encoder → Song index: writes embeddings
- Interactive CLI → BLIP captioning: generates captions
- Interactive CLI → CLIP ranking: ranks captions
- Interactive CLI → Caption stylization: styles caption
- Interactive CLI → OpenCV editor: edits image
- Interactive CLI → Music RAG: requests songs