File size: 1,438 Bytes
d2d3a42
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
ee0043d
d2d3a42
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
49
50
51
52
53
54
55
56
57
58
59
---
title: Construction Scope Validator
emoji: πŸ—οΈ
colorFrom: blue
colorTo: green
sdk: docker
pinned: false
---

# Construction Scope Validator API

FastAPI service that validates and enriches LLM-generated construction scope of work with database-verified stages, tasks, and materials.

## Features

- 🎯 Stage name validation and matching
- πŸ“‹ Task recommendation based on stage and context
- πŸ”¨ Material suggestion with pricing
- πŸ“Š Confidence scores for all matches
- πŸš€ Fast embedding-based search

## API Endpoints

- `GET /` - Service info
- `GET /health` - Health check
- `POST /validate` - Main validation endpoint
- `POST /match-stage` - Test stage matching
- `POST /match-room` - Test room matching

## Usage
```python
import requests

response = requests.post(
    "https://mlbench123-sudoco-scopeofwork.hf.space/validate",
    json={
        "scope_of_work": [
            {
                "area": "Living Room",
                "items": [
                    {
                        "stage": "Demolition",
                        "task": "Remove walls",
                        "material": "Demolition tools",
                        "quantity": 1,
                        "unit": "set"
                    }
                ]
            }
        ]
    }
)

print(response.json())
```

## Model

Uses fine-tuned Sentence Transformer (all-MiniLM-L6-v2) with 89.4% accuracy for stage-task-material matching.