kargaranamir commited on
Commit
62b1636
1 Parent(s): ed38a69

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +12 -12
README.md CHANGED
@@ -21,27 +21,27 @@ language:
21
  You can use this model directly downloading the utils and requirements files and installing requirements:
22
 
23
  ```python
24
- ! wget https://huggingface.co/spaces/kargaranamir/Hengam/raw/main/utils.py
25
- ! wget https://huggingface.co/spaces/kargaranamir/Hengam/raw/main/requirements.txt
26
- ! pip install -r requirements.txt
27
  ```
28
 
29
  and downloading the models HengamTransA.pth or HengamTransW.pth and building ner pipline:
30
 
31
  ```python
32
- import torch
33
- from huggingface_hub import hf_hub_download
34
- from utils import *
35
 
36
- # HengamTransW = hf_hub_download(repo_id="kargaranamir/Hengam", filename="HengamTransW.pth")
37
- HengamTransA = hf_hub_download(repo_id="kargaranamir/Hengam", filename="HengamTransA.pth")
38
  ```
39
 
40
  ```python
41
- # ner = NER(model_path=HengamTransW, tags=['B-TIM', 'I-TIM', 'B-DAT', 'I-DAT', 'O'])
42
- ner = NER(model_path=HengamTransA, tags=['B-TIM', 'I-TIM', 'B-DAT', 'I-DAT', 'O'])
43
- ner('.سلام من و دوستم ساعت ۸ صبح روز سه شنبه رفتیم دوشنبه بازار ')
44
- >>
45
  [{'Text': 'ساعت', 'Tag': 'B-TIM', 'Start': 17, 'End': 21},
46
  {'Text': '۸', 'Tag': 'I-TIM', 'Start': 22, 'End': 23},
47
  {'Text': 'صبح', 'Tag': 'I-TIM', 'Start': 24, 'End': 27},
 
21
  You can use this model directly downloading the utils and requirements files and installing requirements:
22
 
23
  ```python
24
+ >>> ! wget https://huggingface.co/spaces/kargaranamir/Hengam/raw/main/utils.py
25
+ >>> ! wget https://huggingface.co/spaces/kargaranamir/Hengam/raw/main/requirements.txt
26
+ >>> ! pip install -r requirements.txt
27
  ```
28
 
29
  and downloading the models HengamTransA.pth or HengamTransW.pth and building ner pipline:
30
 
31
  ```python
32
+ >>> import torch
33
+ >>> from huggingface_hub import hf_hub_download
34
+ >>> from utils import *
35
 
36
+ >>> # HengamTransW = hf_hub_download(repo_id="kargaranamir/Hengam", filename="HengamTransW.pth")
37
+ >>> HengamTransA = hf_hub_download(repo_id="kargaranamir/Hengam", filename="HengamTransA.pth")
38
  ```
39
 
40
  ```python
41
+ >>> # ner = NER(model_path=HengamTransW, tags=['B-TIM', 'I-TIM', 'B-DAT', 'I-DAT', 'O'])
42
+ >>> ner = NER(model_path=HengamTransA, tags=['B-TIM', 'I-TIM', 'B-DAT', 'I-DAT', 'O'])
43
+ >>> ner('.سلام من و دوستم ساعت ۸ صبح روز سه شنبه رفتیم دوشنبه بازار ')
44
+
45
  [{'Text': 'ساعت', 'Tag': 'B-TIM', 'Start': 17, 'End': 21},
46
  {'Text': '۸', 'Tag': 'I-TIM', 'Start': 22, 'End': 23},
47
  {'Text': 'صبح', 'Tag': 'I-TIM', 'Start': 24, 'End': 27},