HuParser commited on
Commit
722ed09
·
1 Parent(s): bc69825

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +16 -0
README.md CHANGED
@@ -1,3 +1,19 @@
1
  ---
2
  license: apache-2.0
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
  license: apache-2.0
3
  ---
4
+
5
+ ### Model Loading
6
+ ```python
7
+ import xgboost as xgb
8
+ import torch
9
+
10
+ model = xgb.Booster()
11
+ if torch.cuda.is_available():
12
+ model.set_param({"device": "cuda"})
13
+ model.load_model('InfiniFlow/text_concat_xgb_v1.0')
14
+ ```
15
+
16
+ ### Prediction
17
+ ```python
18
+ model.predict(xgb.DMatrix([feature]))[0]
19
+ ```