viswavi commited on
Commit
1b73107
·
1 Parent(s): bacfce1

Update model-loading instructions in README

Browse files
Files changed (1) hide show
  1. README.md +11 -9
README.md CHANGED
@@ -1,24 +1,26 @@
1
  ---
2
  language: en
3
  license: mit
4
- tags:
5
- - Text Classification
6
  ---
7
 
8
- How to load model:
9
-
10
  git clone https://github.com/allenai/drug-combo-extraction.git
11
  conda create --name drug_combo python=3.8.5
12
  conda activate drug_combo
 
13
 
14
- cd drug-combo-extraction
15
- # download checkpoints_pubmedbert_cpt_2021_three_class.tgz
16
- tar -xvzf checkpoints_pubmedbert_cpt_2021_three_class.tgz
 
 
 
17
 
18
- python
19
 
20
  ```
21
  from modeling.model import load_model
22
- checkpoint_path = "checkpoints_pubmedbert_cpt_2021_three_class"
23
  model, tokenizer, metadata = load_model(checkpoint_path)
24
  ```
 
1
  ---
2
  language: en
3
  license: mit
 
 
4
  ---
5
 
6
+ 3) Download accompanying code:
7
+ ```
8
  git clone https://github.com/allenai/drug-combo-extraction.git
9
  conda create --name drug_combo python=3.8.5
10
  conda activate drug_combo
11
+ ```
12
 
13
+ 2) Download model from Huggingface:
14
+
15
+ ```
16
+ git lfs install
17
+ git clone https://huggingface.co/allenai/drug-combo-classifier-pubmedbert-dapt
18
+ ```
19
 
20
+ 3) Load model (`in Python`):
21
 
22
  ```
23
  from modeling.model import load_model
24
+ checkpoint_path = "drug-combo-classifier-pubmedbert-dapt"
25
  model, tokenizer, metadata = load_model(checkpoint_path)
26
  ```