Terry Zhang
commited on
Commit
·
320940c
1
Parent(s):
3b83e0c
add xgb model file and updated reqs
Browse files- .gitattributes +1 -0
- tasks/text.py +2 -2
- tasks/text_models/xgb_pipeline.skops +3 -0
.gitattributes
CHANGED
@@ -33,3 +33,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
36 |
+
*.skops filter=lfs diff=lfs merge=lfs -text
|
tasks/text.py
CHANGED
@@ -31,7 +31,7 @@ def baseline_model(dataset_length: int):
|
|
31 |
def tree_classifier(test_dataset: dict, model: str):
|
32 |
texts = test_dataset["quote"]
|
33 |
|
34 |
-
model_path = f"
|
35 |
|
36 |
model = load(model_path,
|
37 |
trusted=[
|
@@ -96,7 +96,7 @@ async def evaluate_text(request: TextEvaluationRequest,
|
|
96 |
if model == "baseline":
|
97 |
predictions = baseline_model(len(true_labels))
|
98 |
elif model == "tfidf_xgb":
|
99 |
-
predictions = tree_classifier(test_dataset, model='
|
100 |
|
101 |
#--------------------------------------------------------------------------------------------
|
102 |
# YOUR MODEL INFERENCE STOPS HERE
|
|
|
31 |
def tree_classifier(test_dataset: dict, model: str):
|
32 |
texts = test_dataset["quote"]
|
33 |
|
34 |
+
model_path = f"text_models/{model}.skops"
|
35 |
|
36 |
model = load(model_path,
|
37 |
trusted=[
|
|
|
96 |
if model == "baseline":
|
97 |
predictions = baseline_model(len(true_labels))
|
98 |
elif model == "tfidf_xgb":
|
99 |
+
predictions = tree_classifier(test_dataset, model='xgb_pipeline')
|
100 |
|
101 |
#--------------------------------------------------------------------------------------------
|
102 |
# YOUR MODEL INFERENCE STOPS HERE
|
tasks/text_models/xgb_pipeline.skops
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:6c2100f08f614713cd3e19f06e3456f32ef3d3bb23ce4ff2902688c8074bb82e
|
3 |
+
size 3277312
|