File size: 2,387 Bytes
827113c
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
---
title: ACE Classifier Doc2Vec
emoji: 🤖
colorFrom: blue
colorTo: green
sdk: custom
app_port: 8080
---

# ACE Content Attribution Classifier (Doc2Vec)

This model classifies content as either "attributed" or "unattributed" using Doc2Vec embeddings and machine learning classifiers.

## Model Details

- **Training Date**: 2025_09_17
- **Architecture**: Doc2Vec + Machine Learning Classifier
- **Task**: Binary text classification
- **Classes**: attributed, unattributed

## Usage

### API Format

Send POST requests to the inference endpoint:

```json
{
  "inputs": {
    "content": "Your content text here",
    "meta_description": "Optional meta description"
  }
}
```

### Response Format

```json
[
  {
    "label": "attributed",
    "score": 0.75
  },
  {
    "label": "unattributed",
    "score": 0.25
  }
]
```

### Python Example

```python
import requests

api_url = "https://api-inference.huggingface.co/models/athenahq/ACE-classifier-doc2vec"
headers = {"Authorization": "Bearer YOUR_HF_TOKEN"}

data = {
    "inputs": {
        "content": "Machine learning models for content attribution analysis",
        "meta_description": "A comprehensive guide to ML-based content classification"
    }
}

response = requests.post(api_url, headers=headers, json=data)
result = response.json()
print(result)
```

### cURL Example

```bash
curl -X POST \
  https://api-inference.huggingface.co/models/athenahq/ACE-classifier-doc2vec \
  -H "Authorization: Bearer YOUR_HF_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "inputs": {
      "content": "Your content text here",
      "meta_description": "Optional meta description"
    }
  }'
```

## Model Performance

The model uses the best-performing combination from extensive hyperparameter tuning across multiple Doc2Vec configurations and classifiers.

## Files

- `handler.py`: Custom inference handler
- `model_summary.json`: Overview of all trained models
- `rank_1_*_classifier.pkl`: Best performing classifier
- `rank_1_*_doc2vec.model`: Best performing Doc2Vec model
- `rank_1_*_metadata.json`: Model metadata and configuration

## Technical Details

- **Doc2Vec**: Uses both PV-DM and PV-DBOW algorithms
- **Preprocessing**: Text cleaning, tokenization, and filtering
- **Classifiers**: Random Forest, SVM, Logistic Regression, Neural Networks
- **Evaluation**: Comprehensive accuracy and confidence analysis