How leonardltk/ragcipe works
Project type and purpose
• It provides a Gradio interface (images/interface.png) for users to upload a recipe image, applies mmocr for text extraction, computes embeddings, and retrieves similar recipes from a local CSV dataset.
File structure
• Top level:
• Jupyter notebooks (1_Self_querying_retriever.ipynb, 2_Ensemble_search.ipynb, 3_OCR_Recipe-*.ipynb) – exploratory/experimentation
• run.py – main entry point
• recipe_class_*.py – core modules (data loading, OCR, embedding, retrieval)
• data/recipes.csv – backing dataset
• images/ocr_images – sample input images
• requirements.txt / requirements-lite.txt – dependencies
• README.md – quick start + mmocr setup
• No separate “frontend” folder, but the Gradio UI is instantiated within run.py or one of the recipe_class_*.py modules.
• There is an external dependency on mmocr for OCR (cloned under mmocr/).
README for additional insights
• Instructions to install dependencies, clone mmocr, run OCR demo, then run python run.py to launch the app.
Detailed but not over-engineered
• You call out “run.py” as the orchestration entry point.
• Don’t forget to annotate configuration steps (e.g., “Must clone mmocr repo, set env variables for inference”).