Spaces:
Runtime error
Runtime error
Aryan Gosaliya commited on
Commit ยท
26e2bed
1
Parent(s): 6f6fa04
add readme
Browse files
README.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
# ClaimCheck.AI โ Agentic Fact Verification for Calls
|
| 2 |
|
| 3 |
**ClaimCheck.AI** is an multi-agent AI platform that turns meeting audio (Zoom/phone) into an evidence-backed report:
|
|
@@ -10,7 +24,6 @@
|
|
| 10 |
## โจ Why it matters
|
| 11 |
|
| 12 |
High-stakes calls contain promises and metrics (SLA, compliance, finance). ClaimCheck.AI verifies statements against your **trusted KB** so decisions are grounded in factsโnot memory.
|
| 13 |
-
git branch -M main
|
| 14 |
|
| 15 |
---
|
| 16 |
|
|
@@ -43,24 +56,15 @@ claim-check/
|
|
| 43 |
|
| 44 |
---
|
| 45 |
|
| 46 |
-
##
|
| 47 |
|
| 48 |
-
|
| 49 |
-
```bash
|
| 50 |
-
python -m venv .venv
|
| 51 |
-
source .venv/bin/activate
|
| 52 |
-
pip install -r requirements.txt
|
| 53 |
-
```
|
| 54 |
|
| 55 |
-
###
|
| 56 |
-
Copy the sample and fill in values from your IBM Cloud / watsonx project.
|
| 57 |
|
| 58 |
-
|
| 59 |
-
cp .env.sample .env
|
| 60 |
-
```
|
| 61 |
|
| 62 |
-
|
| 63 |
-
```
|
| 64 |
# IBM Core
|
| 65 |
WATSONX_BASE_URL=https://us-south.ml.cloud.ibm.com
|
| 66 |
WATSONX_PROJECT_ID=<your-watsonx-project-id>
|
|
@@ -68,14 +72,14 @@ WATSONX_API_KEY=<your-ibm-cloud-api-key>
|
|
| 68 |
IBM_API_VERSION=2023-05-29
|
| 69 |
|
| 70 |
# Models
|
| 71 |
-
IBM_EMBEDDINGS_MODEL_ID=ibm/granite-embedding-107m-multilingual
|
| 72 |
-
IBM_RERANK_MODEL_ID=ibm/slate-30m-english-rtrvr-v2
|
| 73 |
IBM_VERIFIER_MODEL_ID=ibm/granite-3-8b-instruct
|
| 74 |
IBM_SUMMARY_MODEL_ID=ibm/granite-3-8b-instruct
|
| 75 |
IBM_CLAIM_MODEL_ID=ibm/granite-3-8b-instruct
|
| 76 |
|
| 77 |
# Speech to Text (IBM)
|
| 78 |
-
IBM_STT_URL=<your-ibm-stt-instance-url>
|
| 79 |
IBM_STT_APIKEY=<your-ibm-stt-api-key>
|
| 80 |
|
| 81 |
# Whisper fallback (optional)
|
|
@@ -84,6 +88,24 @@ WHISPER_DEVICE=cpu
|
|
| 84 |
WHISPER_COMPUTE_TYPE=int8
|
| 85 |
```
|
| 86 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 87 |
### 3) Seed the KB
|
| 88 |
Put your facts in `kb/snippets.jsonl` (one JSON per line). Example:
|
| 89 |
|
|
@@ -95,10 +117,10 @@ If you change the KB, rebuild the index by deleting the `kb/index/` folder.
|
|
| 95 |
|
| 96 |
### 4) Run the API
|
| 97 |
```bash
|
| 98 |
-
uvicorn app.main:app --reload
|
| 99 |
```
|
| 100 |
|
| 101 |
-
### 5) Run the UI
|
| 102 |
```bash
|
| 103 |
cd ui/claimcheck-ui
|
| 104 |
pnpm install
|
|
@@ -110,17 +132,20 @@ pnpm dev
|
|
| 110 |
|
| 111 |
**Transcript path (no audio):**
|
| 112 |
```bash
|
| 113 |
-
curl -X POST http://127.0.0.1:
|
|
|
|
|
|
|
| 114 |
```
|
| 115 |
|
| 116 |
**Audio path (IBM STT):**
|
| 117 |
```bash
|
| 118 |
-
curl -X POST http://127.0.0.1:
|
|
|
|
| 119 |
```
|
| 120 |
|
| 121 |
**Health:**
|
| 122 |
```bash
|
| 123 |
-
curl http://127.0.0.1:
|
| 124 |
```
|
| 125 |
|
| 126 |
---
|
|
@@ -139,7 +164,6 @@ ClaimCheck.AI combines modern **agentic AI** orchestration with core NLP, IR, an
|
|
| 139 |
| Verifier | Evaluate support/refute status | `granite-3-8b-instruct` | Fact Verification, Retrieval-Augmented Generation (RAG) |
|
| 140 |
| Summarizer | Generate exec summary + action items | `granite-3-8b-instruct` | Abstractive Summarization, Plan Extraction |
|
| 141 |
|
| 142 |
-
|
| 143 |
---
|
| 144 |
|
| 145 |
## ๐ก๏ธ Notes on data & security
|
|
@@ -156,7 +180,16 @@ ClaimCheck.AI combines modern **agentic AI** orchestration with core NLP, IR, an
|
|
| 156 |
- **JSON parse errors** โ we use a robust extractor; check server logs `[RAW OUTPUT]`.
|
| 157 |
- **Rebuild index** โ Incorrect evidence showing up in the evidence drawer
|
| 158 |
```bash
|
| 159 |
-
|
| 160 |
python -c "from app.agents.retriever import _build_or_load; _build_or_load(); print('rebuild done')"
|
| 161 |
```
|
| 162 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
title: ClaimCheck.AI - Agentic Fact Verification
|
| 3 |
+
emoji: ๐
|
| 4 |
+
colorFrom: blue
|
| 5 |
+
colorTo: green
|
| 6 |
+
sdk: docker
|
| 7 |
+
sdk_version: "4.36.0"
|
| 8 |
+
app_file: app/main.py
|
| 9 |
+
pinned: false
|
| 10 |
+
license: mit
|
| 11 |
+
python_version: 3.9
|
| 12 |
+
suggested_hardware: cpu-basic
|
| 13 |
+
---
|
| 14 |
+
|
| 15 |
# ClaimCheck.AI โ Agentic Fact Verification for Calls
|
| 16 |
|
| 17 |
**ClaimCheck.AI** is an multi-agent AI platform that turns meeting audio (Zoom/phone) into an evidence-backed report:
|
|
|
|
| 24 |
## โจ Why it matters
|
| 25 |
|
| 26 |
High-stakes calls contain promises and metrics (SLA, compliance, finance). ClaimCheck.AI verifies statements against your **trusted KB** so decisions are grounded in factsโnot memory.
|
|
|
|
| 27 |
|
| 28 |
---
|
| 29 |
|
|
|
|
| 56 |
|
| 57 |
---
|
| 58 |
|
| 59 |
+
## ๐ Deploy on Hugging Face Spaces
|
| 60 |
|
| 61 |
+
This app is configured to run on Hugging Face Spaces. The configuration header at the top of this README handles the deployment settings.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 62 |
|
| 63 |
+
### Environment Variables for Spaces
|
|
|
|
| 64 |
|
| 65 |
+
You'll need to set these secrets in your Hugging Face Space settings:
|
|
|
|
|
|
|
| 66 |
|
| 67 |
+
```bash
|
|
|
|
| 68 |
# IBM Core
|
| 69 |
WATSONX_BASE_URL=https://us-south.ml.cloud.ibm.com
|
| 70 |
WATSONX_PROJECT_ID=<your-watsonx-project-id>
|
|
|
|
| 72 |
IBM_API_VERSION=2023-05-29
|
| 73 |
|
| 74 |
# Models
|
| 75 |
+
IBM_EMBEDDINGS_MODEL_ID=ibm/granite-embedding-107m-multilingual
|
| 76 |
+
IBM_RERANK_MODEL_ID=ibm/slate-30m-english-rtrvr-v2
|
| 77 |
IBM_VERIFIER_MODEL_ID=ibm/granite-3-8b-instruct
|
| 78 |
IBM_SUMMARY_MODEL_ID=ibm/granite-3-8b-instruct
|
| 79 |
IBM_CLAIM_MODEL_ID=ibm/granite-3-8b-instruct
|
| 80 |
|
| 81 |
# Speech to Text (IBM)
|
| 82 |
+
IBM_STT_URL=<your-ibm-stt-instance-url>
|
| 83 |
IBM_STT_APIKEY=<your-ibm-stt-api-key>
|
| 84 |
|
| 85 |
# Whisper fallback (optional)
|
|
|
|
| 88 |
WHISPER_COMPUTE_TYPE=int8
|
| 89 |
```
|
| 90 |
|
| 91 |
+
---
|
| 92 |
+
|
| 93 |
+
## ๐งช Quick start (Local Development)
|
| 94 |
+
|
| 95 |
+
### 1) Python env
|
| 96 |
+
```bash
|
| 97 |
+
python -m venv .venv
|
| 98 |
+
source .venv/bin/activate
|
| 99 |
+
pip install -r requirements.txt
|
| 100 |
+
```
|
| 101 |
+
|
| 102 |
+
### 2) Configure IBM (edit `.env`)
|
| 103 |
+
Copy the sample and fill in values from your IBM Cloud / watsonx project.
|
| 104 |
+
|
| 105 |
+
```bash
|
| 106 |
+
cp .env.sample .env
|
| 107 |
+
```
|
| 108 |
+
|
| 109 |
### 3) Seed the KB
|
| 110 |
Put your facts in `kb/snippets.jsonl` (one JSON per line). Example:
|
| 111 |
|
|
|
|
| 117 |
|
| 118 |
### 4) Run the API
|
| 119 |
```bash
|
| 120 |
+
uvicorn app.main:app --reload --host 0.0.0.0 --port 7860
|
| 121 |
```
|
| 122 |
|
| 123 |
+
### 5) Run the UI (Local Only)
|
| 124 |
```bash
|
| 125 |
cd ui/claimcheck-ui
|
| 126 |
pnpm install
|
|
|
|
| 132 |
|
| 133 |
**Transcript path (no audio):**
|
| 134 |
```bash
|
| 135 |
+
curl -X POST http://127.0.0.1:7860/process-transcript \
|
| 136 |
+
-H "Content-Type: application/json" \
|
| 137 |
+
-d '{"text":"We achieved 99.99% uptime in Q2. P95 latency under 200 ms globally. Default retention is 30 days."}'
|
| 138 |
```
|
| 139 |
|
| 140 |
**Audio path (IBM STT):**
|
| 141 |
```bash
|
| 142 |
+
curl -X POST http://127.0.0.1:7860/process-audio \
|
| 143 |
+
-F "file=@data/audio/demo_call.wav"
|
| 144 |
```
|
| 145 |
|
| 146 |
**Health:**
|
| 147 |
```bash
|
| 148 |
+
curl http://127.0.0.1:7860/health/ibm
|
| 149 |
```
|
| 150 |
|
| 151 |
---
|
|
|
|
| 164 |
| Verifier | Evaluate support/refute status | `granite-3-8b-instruct` | Fact Verification, Retrieval-Augmented Generation (RAG) |
|
| 165 |
| Summarizer | Generate exec summary + action items | `granite-3-8b-instruct` | Abstractive Summarization, Plan Extraction |
|
| 166 |
|
|
|
|
| 167 |
---
|
| 168 |
|
| 169 |
## ๐ก๏ธ Notes on data & security
|
|
|
|
| 180 |
- **JSON parse errors** โ we use a robust extractor; check server logs `[RAW OUTPUT]`.
|
| 181 |
- **Rebuild index** โ Incorrect evidence showing up in the evidence drawer
|
| 182 |
```bash
|
| 183 |
+
rm -f kb/index/kb.index kb/index/kb_meta.json
|
| 184 |
python -c "from app.agents.retriever import _build_or_load; _build_or_load(); print('rebuild done')"
|
| 185 |
```
|
| 186 |
|
| 187 |
+
---
|
| 188 |
+
|
| 189 |
+
## ๐ License
|
| 190 |
+
|
| 191 |
+
MIT License - see LICENSE file for details.
|
| 192 |
+
|
| 193 |
+
---
|
| 194 |
+
|
| 195 |
+
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|