Spaces:
Running
Running
Commit
Β·
7317b04
1
Parent(s):
c51e8ce
Fix app_file path to scripts/demo_gradio.py
Browse files
README.md
CHANGED
|
@@ -1,14 +1,67 @@
|
|
| 1 |
---
|
| 2 |
title: LexiMind
|
| 3 |
-
emoji:
|
| 4 |
-
colorFrom:
|
| 5 |
-
colorTo:
|
| 6 |
sdk: gradio
|
| 7 |
sdk_version: 5.49.1
|
| 8 |
-
app_file:
|
| 9 |
pinned: false
|
| 10 |
license: mit
|
| 11 |
-
short_description: Multi-
|
| 12 |
---
|
| 13 |
|
| 14 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
title: LexiMind
|
| 3 |
+
emoji: π§
|
| 4 |
+
colorFrom: blue
|
| 5 |
+
colorTo: purple
|
| 6 |
sdk: gradio
|
| 7 |
sdk_version: 5.49.1
|
| 8 |
+
app_file: scripts/demo_gradio.py
|
| 9 |
pinned: false
|
| 10 |
license: mit
|
| 11 |
+
short_description: Multi-task transformer for document understanding
|
| 12 |
---
|
| 13 |
|
| 14 |
+
# LexiMind
|
| 15 |
+
|
| 16 |
+
LexiMind is a multitask transformer that performs document summarization, multi-label emotion detection, and topic classification in a single Gradio experience. The project packages the training code, inference pipeline, and visual analytics needed to explore model behavior.
|
| 17 |
+
|
| 18 |
+
## Run The Demo Locally
|
| 19 |
+
|
| 20 |
+
```bash
|
| 21 |
+
pip install -r requirements.txt
|
| 22 |
+
python scripts/demo_gradio.py
|
| 23 |
+
```
|
| 24 |
+
|
| 25 |
+
The Gradio space expects the following assets to be available at runtime:
|
| 26 |
+
|
| 27 |
+
- `checkpoints/best.pt` β multitask model weights
|
| 28 |
+
- `artifacts/hf_tokenizer/` β tokenizer files (or adjust the `tokenizer_dir` argument)
|
| 29 |
+
- `data/labels.json` β label metadata for emotion and topic heads
|
| 30 |
+
|
| 31 |
+
## Features
|
| 32 |
+
|
| 33 |
+
- π **Text Summarization** with adjustable compression
|
| 34 |
+
- π **Emotion Detection** with visualization
|
| 35 |
+
- π·οΈ **Topic Prediction** with confidence scores
|
| 36 |
+
- π₯ **Attention Heatmap** visualization
|
| 37 |
+
|
| 38 |
+
## Project Structure
|
| 39 |
+
|
| 40 |
+
```
|
| 41 |
+
.
|
| 42 |
+
βββ configs/ # YAML presets for data, model, and training runs
|
| 43 |
+
βββ scripts/
|
| 44 |
+
β βββ demo_gradio.py # Hugging Face Space entry point
|
| 45 |
+
β βββ train.py # Training CLI
|
| 46 |
+
β βββ inference.py # Batch inference utility
|
| 47 |
+
βββ src/
|
| 48 |
+
β βββ data/ # Tokenization, datasets, and dataloaders
|
| 49 |
+
β βββ inference/ # Pipeline orchestration for multitask heads
|
| 50 |
+
β βββ models/ # Encoder/decoder/backbone modules
|
| 51 |
+
β βββ training/ # Trainer, callbacks, metrics, and losses
|
| 52 |
+
β βββ visualization/ # Attention, embeddings, and metric plots
|
| 53 |
+
βββ tests/ # Pytest suites for API, data, inference, models, training
|
| 54 |
+
βββ artifacts/ # Saved tokenizer assets
|
| 55 |
+
βββ checkpoints/ # Pretrained multitask checkpoints
|
| 56 |
+
βββ data/ # Raw, processed, and cached datasets
|
| 57 |
+
```
|
| 58 |
+
|
| 59 |
+
## Usage
|
| 60 |
+
|
| 61 |
+
Enter your text, adjust the compression slider, and click "Analyze" to see the results!
|
| 62 |
+
|
| 63 |
+
## Repository
|
| 64 |
+
|
| 65 |
+
GitHub: [OliverPerrin/LexiMind](https://github.com/OliverPerrin/LexiMind)
|
| 66 |
+
|
| 67 |
+
HuggingFace: [OliverPerrin/LexiMind](https://huggingface.co/spaces/OliverPerrin/LexiMind)
|