abhinavvvvv commited on
Commit
4b3a949
·
1 Parent(s): 2538ca6

added labeling

Browse files
Files changed (1) hide show
  1. app/model_loader.py +10 -2
app/model_loader.py CHANGED
@@ -17,8 +17,16 @@ model.eval()
17
 
18
  print("Model loaded successfully.")
19
 
20
- # Load label mapping from model repo
21
- label_mapping = model.config.id2label if hasattr(model.config, "id2label") else None
 
 
 
 
 
 
 
 
22
 
23
  if label_mapping is None or len(label_mapping) == 0:
24
  # fallback if id2label not saved in config
 
17
 
18
  print("Model loaded successfully.")
19
 
20
+
21
+ label_mapping = {
22
+ 0: "Delayed payment (no dispute)",
23
+ 1: "Quality dispute",
24
+ 2: "No formal contract",
25
+ 3: "Partial payment dispute",
26
+ 4: "Government procurement delay",
27
+ 5: "Service-related dispute"
28
+ }
29
+
30
 
31
  if label_mapping is None or len(label_mapping) == 0:
32
  # fallback if id2label not saved in config