ganeshasapu commited on
Commit
827113c
·
verified ·
1 Parent(s): 8a7c329

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +103 -0
README.md ADDED
@@ -0,0 +1,103 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ title: ACE Classifier Doc2Vec
3
+ emoji: 🤖
4
+ colorFrom: blue
5
+ colorTo: green
6
+ sdk: custom
7
+ app_port: 8080
8
+ ---
9
+
10
+ # ACE Content Attribution Classifier (Doc2Vec)
11
+
12
+ This model classifies content as either "attributed" or "unattributed" using Doc2Vec embeddings and machine learning classifiers.
13
+
14
+ ## Model Details
15
+
16
+ - **Training Date**: 2025_09_17
17
+ - **Architecture**: Doc2Vec + Machine Learning Classifier
18
+ - **Task**: Binary text classification
19
+ - **Classes**: attributed, unattributed
20
+
21
+ ## Usage
22
+
23
+ ### API Format
24
+
25
+ Send POST requests to the inference endpoint:
26
+
27
+ ```json
28
+ {
29
+ "inputs": {
30
+ "content": "Your content text here",
31
+ "meta_description": "Optional meta description"
32
+ }
33
+ }
34
+ ```
35
+
36
+ ### Response Format
37
+
38
+ ```json
39
+ [
40
+ {
41
+ "label": "attributed",
42
+ "score": 0.75
43
+ },
44
+ {
45
+ "label": "unattributed",
46
+ "score": 0.25
47
+ }
48
+ ]
49
+ ```
50
+
51
+ ### Python Example
52
+
53
+ ```python
54
+ import requests
55
+
56
+ api_url = "https://api-inference.huggingface.co/models/athenahq/ACE-classifier-doc2vec"
57
+ headers = {"Authorization": "Bearer YOUR_HF_TOKEN"}
58
+
59
+ data = {
60
+ "inputs": {
61
+ "content": "Machine learning models for content attribution analysis",
62
+ "meta_description": "A comprehensive guide to ML-based content classification"
63
+ }
64
+ }
65
+
66
+ response = requests.post(api_url, headers=headers, json=data)
67
+ result = response.json()
68
+ print(result)
69
+ ```
70
+
71
+ ### cURL Example
72
+
73
+ ```bash
74
+ curl -X POST \
75
+ https://api-inference.huggingface.co/models/athenahq/ACE-classifier-doc2vec \
76
+ -H "Authorization: Bearer YOUR_HF_TOKEN" \
77
+ -H "Content-Type: application/json" \
78
+ -d '{
79
+ "inputs": {
80
+ "content": "Your content text here",
81
+ "meta_description": "Optional meta description"
82
+ }
83
+ }'
84
+ ```
85
+
86
+ ## Model Performance
87
+
88
+ The model uses the best-performing combination from extensive hyperparameter tuning across multiple Doc2Vec configurations and classifiers.
89
+
90
+ ## Files
91
+
92
+ - `handler.py`: Custom inference handler
93
+ - `model_summary.json`: Overview of all trained models
94
+ - `rank_1_*_classifier.pkl`: Best performing classifier
95
+ - `rank_1_*_doc2vec.model`: Best performing Doc2Vec model
96
+ - `rank_1_*_metadata.json`: Model metadata and configuration
97
+
98
+ ## Technical Details
99
+
100
+ - **Doc2Vec**: Uses both PV-DM and PV-DBOW algorithms
101
+ - **Preprocessing**: Text cleaning, tokenization, and filtering
102
+ - **Classifiers**: Random Forest, SVM, Logistic Regression, Neural Networks
103
+ - **Evaluation**: Comprehensive accuracy and confidence analysis