Rajeev Ranjan Pandey commited on
Commit
5378bb9
Β·
1 Parent(s): a543f4f

docs: add CHANGELOG.md documenting all v1.1.0 UI and backend changes

Browse files

Changes documented:
- Live ROUGE Experiment Results panel (LiveMetrics.jsx)
- Per-model directive prompts to fix summarization quality
- Full light/dark mode across all components
- DatasetToggle renamed to 'Available Datasets' with BrainCircuit icon
- BatchUpload renamed to 'Load Your Dataset' with cleaned up UX
- Info icon and tooltip fixed for light mode readability
- Text size increased (text-lg, 1.85 line-height) in both panes
- Hero stats wrapped in visible card chips
- CUD badge moved from hero to navbar
- Severity-stratified dataset preview (5 samples, one per level)
- num_beams 4β†’2, dynamic 50% token cap, length_penalty 3.0

Requires backend restart to activate new generation parameters.

Files changed (1) hide show
  1. CHANGELOG.md +85 -0
CHANGELOG.md ADDED
@@ -0,0 +1,85 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Changelog
2
+
3
+ All notable changes to the **TrafficIntel β€” LLMs for Traffic Incident Summarization** project are documented here.
4
+
5
+ ---
6
+
7
+ ## [v1.1.0] β€” 2026-03-19 Β· UI Overhaul + Summarization Quality
8
+
9
+ ### ✨ New Features
10
+
11
+ #### Live ROUGE Experiment Results Panel
12
+ - Added `LiveMetrics.jsx` β€” a new right-column card showing ROUGE-1 bar charts for all four models (BART, Flan-T5, PEGASUS, TextRank) sourced from the experiment corpus (n = 200).
13
+ - The **currently selected model** is highlighted in orange with an animated gradient bar and an "active" badge.
14
+ - A 4-metric grid (R-1, R-2, R-L, CR) updates live as the user switches models.
15
+ - A green delta indicator shows ROUGE-1 gain over the TextRank baseline (e.g. +35.8% for BART).
16
+ - Each metric now has a bullet-point description below explaining what it measures.
17
+
18
+ #### Dataset Loader (`BatchUpload.jsx`)
19
+ - Renamed from "Batch Processing" / "Evaluation Data Loader" β†’ **"Load Your Dataset"** for clarity.
20
+ - File format guidance simplified: `.csv only Β· max 50 MB` displayed inline in the drop zone.
21
+ - Clear reference to the required `Incident Description` column in the helper text.
22
+
23
+ #### Available Datasets Panel (`DatasetToggle.jsx`)
24
+ - Renamed section header from "Analysis Dataset" β†’ **"Available Datasets"**.
25
+ - Replaced `Database` icon with `BrainCircuit` (ML-themed) icon rendered in orange.
26
+ - Full light/dark mode support with proper hover states and contrast.
27
+
28
+ ---
29
+
30
+ ### πŸ› Bug Fixes & Improvements
31
+
32
+ #### Summarization Quality β€” Backend
33
+ - **Per-model directive prompts** injected before incident text to force genuine rewriting:
34
+ - BART-large-CNN: instructed to report only location, type, severity, and road impact briefly.
35
+ - Flan-T5-small: instructed to produce a one-sentence summary under 35 words.
36
+ - PEGASUS: given a compact-sentence summarization directive.
37
+ - **Dynamic token cap**: `max_new_tokens` capped at 50% of raw input token count, preventing verbatim echoing of short incidents.
38
+ - `length_penalty` raised to **3.0** β€” strongly penalises long outputs and promotes compression.
39
+ - `no_repeat_ngram_size` raised to **4** β€” blocks 4-gram phrase copying from the source text.
40
+ - `num_beams` reduced from 4 β†’ **2** for ~40% faster inference with minimal quality loss.
41
+
42
+ #### Light Mode β€” Full Global Support
43
+ - Root page background (`Home.jsx`): `bg-[#060d1f]` β†’ `bg-slate-50 dark:bg-[#060d1f]`.
44
+ - Navbar: white background in light, all text/icon colours use `dark:` variants.
45
+ - SummarizerWidget card, input/output panes, model cards, buttons: full `dark:` pairing.
46
+ - Dataset Preview (`Home.jsx`): `bg-[#0d1326]` β†’ `bg-white dark:bg-[#0d1326]`.
47
+ - DatasetToggle, BatchUpload, LiveMetrics: all hardcoded dark colours replaced.
48
+ - Hero stat chips: wrapped in `bg-slate-100 dark:bg-white/5` cards; value text `text-slate-900 dark:text-white`.
49
+ - Model card names, Speed label, speed bars: all light-mode-safe.
50
+ - Copy & Save buttons: `bg-slate-100 text-slate-700` in light, `bg-white/8 text-white` in dark.
51
+
52
+ #### Info Icon & Tooltip
53
+ - Info `i` badge: `border-2` (thicker), always visible at `text-slate-500`, glows `text-orange-600` on hover.
54
+ - Tooltip: `bg-white border-slate-200 text-slate-700` in light / `bg-slate-800 text-slate-300` in dark.
55
+
56
+ #### Text Readability
57
+ - Input textarea and output paragraph: both use `text-lg leading-[1.85]` β€” larger and breathable.
58
+ - Removed artificial `min-h/max-h` constraints on the output pane that created dead whitespace.
59
+ - Textarea uses fixed `rows={5}` to eliminate empty space when content is short.
60
+
61
+ #### Visual / Layout
62
+ - "CUD Β· AAI Midterm Project" badge moved from hero β†’ below the TrafficIntel logo in the navbar (less cluttered hero).
63
+ - All card borders tightened: `border-slate-200` β†’ `border-slate-300 dark:border-white/[0.07]` for better definition.
64
+ - A `border-t` separator added between hero and the 3-column grid for clean visual rhythm.
65
+ - Dataset Preview shows **5 severity-stratified samples** (one per severity level: High β†’ Medium β†’ Critical β†’ Low) instead of simply the top-5 rows, so the preview always shows a meaningful, diverse range.
66
+
67
+ ---
68
+
69
+ ### πŸ“ Files Changed
70
+
71
+ | File | Change |
72
+ |------|--------|
73
+ | `src/models/abstractive.py` | Per-model prompts, dynamic token cap, stronger length penalty |
74
+ | `config.yaml` | `num_beams: 4β†’2`, `max_new_tokens: 96β†’72` |
75
+ | `backend/main.py` | Severity-stratified `/samples` endpoint, `_safe_int` helper |
76
+ | `frontend/src/pages/Home.jsx` | Full light mode, stat cards, CUD badge moved, dataset preview border |
77
+ | `frontend/src/components/SummarizerWidget.jsx` | Light mode, text size, info icon, tooltip |
78
+ | `frontend/src/components/DatasetToggle.jsx` | Renamed, BrainCircuit icon, light mode |
79
+ | `frontend/src/components/BatchUpload.jsx` | Renamed, cleaned up, light mode |
80
+ | `frontend/src/components/LiveMetrics.jsx` | New component β€” live ROUGE scores |
81
+ | `frontend/src/index.css` | Dark theme tokens, Inter font, custom scrollbar, grid background |
82
+
83
+ ---
84
+
85
+ > ⚠️ **Backend restart required** after pulling to activate the new generation parameters and prompt changes.