Spaces:
Sleeping
Sleeping
Update README.md
Browse files
README.md
CHANGED
|
@@ -1,12 +1,74 @@
|
|
| 1 |
---
|
| 2 |
-
title:
|
| 3 |
-
emoji:
|
| 4 |
-
colorFrom:
|
| 5 |
colorTo: blue
|
| 6 |
sdk: gradio
|
| 7 |
-
sdk_version:
|
| 8 |
app_file: app.py
|
| 9 |
pinned: false
|
|
|
|
|
|
|
| 10 |
---
|
| 11 |
|
| 12 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
+
title: ESG Document Intelligence Platform
|
| 3 |
+
emoji: 🌿
|
| 4 |
+
colorFrom: green
|
| 5 |
colorTo: blue
|
| 6 |
sdk: gradio
|
| 7 |
+
sdk_version: 4.19.0
|
| 8 |
app_file: app.py
|
| 9 |
pinned: false
|
| 10 |
+
license: apache-2.0
|
| 11 |
+
short_description: HyperRAG + Discourse Graph for ESG Report Analysis
|
| 12 |
---
|
| 13 |
|
| 14 |
+
# 🌿 Multimodal ESG Document Intelligence Platform
|
| 15 |
+
|
| 16 |
+
> **HyperRAG + Discourse Graph Reasoning for ESG Report Analysis**
|
| 17 |
+
|
| 18 |
+
Upload any ESG / Sustainability PDF report and get:
|
| 19 |
+
|
| 20 |
+
- 💬 **Contextual Q&A** — ask questions about the report, answered with page-level evidence
|
| 21 |
+
- 📊 **ESG Pillar Scores** — keyword-based E, S, G scoring + sector detection
|
| 22 |
+
- 🚨 **Greenwashing Detection** — flags unsubstantiated claims with exact page references
|
| 23 |
+
- 🕸️ **Discourse Graph Insights** — models relationships between claims, evidence, policies and metrics
|
| 24 |
+
|
| 25 |
+
## Architecture
|
| 26 |
+
|
| 27 |
+
```
|
| 28 |
+
PDF → Text Extraction (pdfplumber)
|
| 29 |
+
→ Chunking (400-word windows, 80-word overlap)
|
| 30 |
+
→ Embeddings (sentence-transformers/all-MiniLM-L6-v2)
|
| 31 |
+
→ Qdrant Vector Index (in-memory)
|
| 32 |
+
→ Discourse Graph (NetworkX DiGraph)
|
| 33 |
+
claims ──supported_by──▶ evidence
|
| 34 |
+
policies ──measured_by──▶ metrics
|
| 35 |
+
→ HyperRAG Retrieval
|
| 36 |
+
vector search + graph neighbourhood expansion
|
| 37 |
+
→ Flan-T5 Answer Generation
|
| 38 |
+
```
|
| 39 |
+
|
| 40 |
+
## Key Technologies
|
| 41 |
+
|
| 42 |
+
| Layer | Technology |
|
| 43 |
+
|-------|-----------|
|
| 44 |
+
| Vector Store | Qdrant (in-memory) |
|
| 45 |
+
| Embeddings | `all-MiniLM-L6-v2` |
|
| 46 |
+
| LLM | `google/flan-t5-base` |
|
| 47 |
+
| Graph | NetworkX DiGraph |
|
| 48 |
+
| Retrieval | HyperRAG (vector + graph) |
|
| 49 |
+
| UI | Gradio |
|
| 50 |
+
|
| 51 |
+
## Usage
|
| 52 |
+
|
| 53 |
+
1. **Upload** an ESG report PDF in the *Upload & Process* tab
|
| 54 |
+
2. Click **Process Document** — wait ~30–60 s for indexing
|
| 55 |
+
3. Switch to any analysis tab and explore!
|
| 56 |
+
|
| 57 |
+
## Limitations
|
| 58 |
+
|
| 59 |
+
- ESG scores are keyword-density heuristics (not certified ratings)
|
| 60 |
+
- `flan-t5-base` is used for CPU compatibility; swap in a larger model for production
|
| 61 |
+
- Greenwashing detection is pattern-based and requires expert review
|
| 62 |
+
|
| 63 |
+
## Running Locally
|
| 64 |
+
|
| 65 |
+
```bash
|
| 66 |
+
git clone https://huggingface.co/spaces/<your-username>/esg-intelligence
|
| 67 |
+
cd esg-intelligence
|
| 68 |
+
pip install -r requirements.txt
|
| 69 |
+
python app.py
|
| 70 |
+
```
|
| 71 |
+
|
| 72 |
+
## License
|
| 73 |
+
|
| 74 |
+
Apache 2.0 — research & demonstration use only.
|