NorHsangPha commited on
Commit
37a736d
·
1 Parent(s): 949c5da

Update: update fasttext model

Browse files
Files changed (3) hide show
  1. __pycache__/lid.cpython-310.pyc +0 -0
  2. fasttext/model.bin +3 -0
  3. lid.py +7 -7
__pycache__/lid.cpython-310.pyc ADDED
Binary file (1.81 kB). View file
 
fasttext/model.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8ded5749a2ad79ae9ab7c9190c7c8b97ff20d54ad8b9527ffa50107238fc7f6a
3
+ size 1176355829
lid.py CHANGED
@@ -4,13 +4,13 @@ import matplotlib.pyplot as plt
4
  import seaborn as sns
5
 
6
  # Download the model from Hugging Face Hub
7
- model_path = hf_hub_download(
8
- # repo_id="cis-lmu/glotlid", filename="model.bin", cache_dir="./glotlid"
9
- repo_id="facebook/fasttext-language-identification",
10
- filename="model.bin",
11
- cache_dir="fasttext",
12
- )
13
- model = fasttext.load_model(model_path)
14
 
15
 
16
  def identify_languages(title):
 
4
  import seaborn as sns
5
 
6
  # Download the model from Hugging Face Hub
7
+ # model_path = hf_hub_download(
8
+ # # repo_id="cis-lmu/glotlid", filename="model.bin", cache_dir="./glotlid"
9
+ # repo_id="facebook/fasttext-language-identification",
10
+ # filename="model.bin",
11
+ # cache_dir="fasttext",
12
+ # )
13
+ model = fasttext.load_model("fasttext/model.bin")
14
 
15
 
16
  def identify_languages(title):