Update README.md
Browse files
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 |
-
|
|
56 |
-
|
|
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('
|
65 |
-
model.predict(
|
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 |
```
|