SmartManuals-AI / README.md
damoojeje's picture
Update README.md
d0bba59 verified
|
raw
history blame
2.49 kB

βœ… SmartManuals-AI for Hugging Face Spaces

SmartManuals-AI is a local-first document QA system that uses RAG (retrieval-augmented generation), OCR, and embedding search to answer technical questions from PDFs and Word documents.


πŸ”§ Features

  • πŸ” Ask natural-language questions to your manuals
  • πŸ“„ Handles both PDFs and Word .docx files
  • 🧠 Uses semantic search with sentence-transformers
  • πŸ—ƒοΈ ChromaDB for fast local vector indexing
  • πŸ’¬ Answers generated by Meta LLaMA 3.1 8B Instruct (default)
  • πŸ“Š Gradio dashboard for interaction

πŸ“ Folder Structure

SmartManuals-AI/
β”œβ”€β”€ app.py                 # Hugging Face Spaces main app
β”œβ”€β”€ Manuals/               # πŸ“‚ Upload your PDF and Word manuals here
β”‚   β”œβ”€β”€ OM_Treadmill.pdf
β”‚   └── Parts_Bike.docx
β”œβ”€β”€ chroma_store/         # ⛓️ ChromaDB vector DB (auto-generated)
β”œβ”€β”€ requirements.txt      # πŸ“¦ Dependencies
└── README.md             # πŸ“– This file

πŸš€ Usage in Hugging Face Spaces

πŸ” Environment Variables

Add your Hugging Face token as a secret:

  • HF_TOKEN: Your Hugging Face access token (required for gated models)

πŸ“€ Upload Your Files

Put all your manuals (PDF and Word .docx) into the Manuals/ folder.

🧠 App Behavior

  • On startup:
    • Extracts text (with OCR fallback) from PDFs
    • Extracts clean text from Word documents
    • Chunks and embeds content into ChromaDB
  • During inference:
    • Retrieves semantically relevant chunks
    • Sends them to LLaMA 3.1 Instruct for answer generation

❌ No User Upload

This app is designed to work without file uploads. All processing is done on preloaded files in the Manuals/ directory.


🧠 Default Model

  • Uses meta-llama/Llama-3.1-8B-Instruct
  • All question answering is fully automatic
  • User is not required to pick a model, doc type, or filter β€” the system decides based on question and content.

🧩 Supported File Types

  • .pdf (with OCR for scanned pages)
  • .docx (via python-docx)

πŸ§ͺ Local Development

Install dependencies:

pip install -r requirements.txt

Run locally:

python app.py

πŸ‘¨πŸ½β€πŸ’» Project by: Damilare Eniolabi

GitHub: @damoojeje


πŸ“Œ Tags

RAG LLM Chroma OCR PDF Word Gradio HuggingFace SmartManualsAI