ytzfhqs commited on
Commit
26d09e6
·
verified ·
1 Parent(s): 7946a19

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +7 -4
README.md CHANGED
@@ -52,15 +52,18 @@ The above datasets are high-quality, open-source datasets, which can save a lot
52
 
53
  | Dataset | Precision | Recall |
54
  |---------|----------|----------|
55
- | Train | 0.9987 | 0.9987 |
56
- | Test | 0.9962 | 0.9962 |
57
 
58
  ## Usage Example
59
  ```python
60
  import fasttext
61
  from huggingface_hub import hf_hub_download
62
 
 
 
 
63
  model_path = hf_hub_download(repo_id="ytzfhqs/fasttext-med-en-zh-identification", filename="model.bin")
64
- model = fasttext.load_model('model.bin')
65
- model.predict("Hello, world!")
66
  ```
 
52
 
53
  | Dataset | Precision | Recall |
54
  |---------|----------|----------|
55
+ | Train | 0.9987 | 0.9987 |
56
+ | Test | 0.9962 | 0.9962 |
57
 
58
  ## Usage Example
59
  ```python
60
  import fasttext
61
  from huggingface_hub import hf_hub_download
62
 
63
+ def to_low(text):
64
+ return text.strip().lower()
65
+
66
  model_path = hf_hub_download(repo_id="ytzfhqs/fasttext-med-en-zh-identification", filename="model.bin")
67
+ model = fasttext.load_model('fasttext.bin')
68
+ model.predict(to_low('Hello, world!'))
69
  ```