menu_card / README.md
sujal7102003's picture
Upload folder using huggingface_hub
9221efc verified
metadata
title: Menu OCR + Food Card Generator 🍽️
emoji: 🧾
colorFrom: blue
colorTo: green
sdk: docker
sdk_version: '1.0'
app_file: main.py
pinned: false

🍽️ AI-Powered Menu OCR & Food Card Generator

This project allows you to upload an image of a restaurant menu, extract food details using Google Gemini 1.5 Flash, and generate photorealistic food cards using Stable Diffusion β€” all inside a clean FastAPI + Jinja2 web app.


πŸ”§ Features

  • βœ… OCR & extraction using Google Gemini 1.5 Flash
  • βœ… Photorealistic image generation with Stable Diffusion
  • βœ… Responsive UI with Jinja2 templating
  • βœ… FastAPI backend with static image serving
  • βœ… Deployable on Hugging Face Spaces or Docker

πŸ“¦ Tech Stack

  • FastAPI + Uvicorn
  • Google Generative AI (google-generativeai)
  • Hugging Face Diffusers (Stable Diffusion)
  • PyTorch with CUDA support
  • Jinja2 Templates
  • PIL, Matplotlib, Multipart

πŸ§ͺ How It Works

  1. Upload a restaurant menu image.
  2. Gemini extracts food names, descriptions, prices, and categories.
  3. Stable Diffusion generates high-quality images of each food item.
  4. Final cards are rendered in a neat grid layout via Jinja2.

πŸš€ How to Run

πŸ“¦ Local Development

  1. Install dependencies:

    pip install -r requirements.txt