File size: 874 Bytes
b144cb7
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# Reflex UI (Professional Web App)

This is a **separate** UI project built with **Reflex** (Python → FastAPI backend + React/Next.js frontend).

It **does not modify** any backend/model/dataset code. It only imports and calls the existing pipeline:

- `classifier/inference.py` (feature building + XGBoost prediction)
- `xai/shaplayer.py`, `xai/grouping.py`, `xai/text_explainer.py` (SHAP + explanations)

## Run

From the repository root:

```bash
python -m pip install -r requirements.txt
python -m pip install -r reflex_ui/requirements.txt
```

Then start Reflex:

```bash
cd reflex_ui
reflex run
```

Open the local URL printed by Reflex.

## Notes

- First prediction can be slower because `microsoft/unixcoder-base` may load/download.
- If you hit SHAP / NumPy compatibility errors, pin `numpy<2` (see repo root `requirements.txt`) and a compatible `shap` version.