Spaces:
Running
Running
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 | |
[](https://huggingface.co/spaces/your-username/doc-qa) | |
[] | |
[](https://huggingface.co/deepset/roberta-base-squad2) | |
[](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 | |
```bash | |
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 11, 2025 ๐ | |
- Enhanced confidence score display. ๐จ - June 10, 2025 ๐ | |
- Improved handling of large documents. ๐ - June 09, 2025 ๐ | |
- Upgraded RoBERTa-SQuAD2 model for better answers. ๐ - June 08, 2025 ๐ | |
- Added support for multi-question inputs. ๐จ - June 07, 2025 ๐ | |
- Optimized CPU inference for faster responses. โก - June 06, 2025 ๐ | |
- Enhanced confidence score display. - June 05, 2025 ๐ | |
- Improved handling of large documents. - June 04, 2025 ๐ | |
- Upgraded RoBERTa-SQuAD2 model for better answers. โ - June 03, 2025 ๐ | |
- Added support for multi-question inputs. - June 02, 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 |