File size: 968 Bytes
6cf9641
2a071e1
cc3c1a2
2a071e1
 
 
 
6cf9641
 
cc3c1a2
2a071e1
 
cc3c1a2
 
6cf9641
2a071e1
6cf9641
2a071e1
6cf9641
 
 
2a071e1
 
6cf9641
2a071e1
 
cc3c1a2
6cf9641
2a071e1
 
6cf9641
2a071e1
 
 
 
 
6cf9641
2a071e1
 
 
 
 
 
 
6cf9641
 
 
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# Testing the local model

The Space inference path is:

```text
Custom frontend
  -> queued Gradio backend
  -> Nemotron OCR v2 for screenshot text
  -> app/model_endpoint.py
  -> MiniCPM5-1B through Transformers on ZeroGPU
```

Local endpoint tests use MiniCPM5-1B GGUF through `llama-cpp-python`.

## Fast checks

Run tests that do not load the model:

```powershell
python app.py --self-test
python -m unittest
```

Download the configured GGUF:

```powershell
python -m pip install -r requirements-local.txt
python app.py --download-model
```

Run a real text-generation contract test:

```powershell
python app.py --test-endpoint
```

The command fails unless the model returns all required fields:

- `risk_label`
- `simple_explanation`
- `red_flags`
- `safe_next_steps`
- `reply_draft`

The old Modal deployments and request scripts are intentionally preserved under
`experiments/` for comparison and reproducibility. They are not imported by the
application.