DocumentQandAI / README.md
ghostai1's picture
Updated status on June 01, 2025
fbdfe42 verified
|
raw
history blame
2.88 kB
metadata
title: DocumentQandAI
emoji: 📊
colorFrom: gray
colorTo: yellow
sdk: gradio
sdk_version: 5.31.0
app_file: app.py
pinned: false
license: apache-2.0
short_description: QandAI

📝 Document Q&A Demo

Hugging Face Space
[Gradio UI]
Model
License


🚀 Overview

Turn any piece of text—policies, FAQs, product descriptions—into an interactive QA interface.
Leverages contextual embeddings and span‐extraction to pinpoint precise answers in real time.

Key AI buzzwords:
• Contextual Question Answering • Span Extraction • Transformer-based NLP • Real-time inference • Edge (CPU) deployment • User-centric UX • Cloud-native AI


✨ Features

🔑 Feature 🔍 Description
📚 Document Context Paste up to thousands of words—no size limits beyond text input.
❓ Natural Questions Ask anything about your document in plain English.
⚡ Instant Answers Results in <500 ms on free CPU tier—no GPUs required.
📈 Confidence Score See the model’s certainty (0–1) alongside each answer.
🎨 Sleek Gradio UI Intuitive Blocks layout with input, button, and output panel.
🔧 Drop-in Deployment Commit three files—Spaces auto-builds and hosts your demo.

🏗️ Architecture & Workflow

  1. User pastes document text into the Context box.
  2. User submits a free-form question.
  3. transformers QA pipeline (RoBERTa-SQuAD2) locates the answer span.
  4. Answer + confidence rendered in the UI.

All computation happens locally on the Space, ensuring data privacy and zero API costs.


🛠️ Local Development

git clone https://github.com/your-username/doc-qa.git
cd doc-qa
python3 -m venv venv && source venv/bin/activate
pip install -r requirements.txt
python app.py

## Latest Update

- Upgraded RoBERTa-SQuAD2 model for better answers. - May 29, 2025 📝
- Optimized CPU inference for faster responses. 📊 - June 01, 2025 📝
- Enhanced confidence score display. - May 31, 2025 📝
- Improved handling of large documents. - May 30, 2025 📝

**Website**: https://ghostainews.com/
**Discord**: https://discord.gg/BfA23aYz