Update README.md
Browse files
README.md
CHANGED
|
@@ -33,6 +33,7 @@ NOTE can be utilized to generate various summaries not only discharge summaries
|
|
| 33 |
## Usage
|
| 34 |
|
| 35 |
~~~python
|
|
|
|
| 36 |
from transformers import AutoModelForCausalLM, AutoTokenizer, pipeline
|
| 37 |
model = AutoModelForCausalLM.from_pretrained("jinee/note", load_in_4bit=True, device_map="auto")
|
| 38 |
tokenizer = AutoTokenizer.from_pretrained("jinee/note")
|
|
@@ -55,6 +56,7 @@ Also, never make up information that is not in the input data, and write a repor
|
|
| 55 |
7. Discharge outcomes and treatment plan
|
| 56 |
8. Overall summary of at least 500 characters in lines including the above contents
|
| 57 |
'''
|
|
|
|
| 58 |
|
| 59 |
def generation(model, tokenizer, input_data):
|
| 60 |
pipe = pipeline('text-generation',
|
|
|
|
| 33 |
## Usage
|
| 34 |
|
| 35 |
~~~python
|
| 36 |
+
import torch
|
| 37 |
from transformers import AutoModelForCausalLM, AutoTokenizer, pipeline
|
| 38 |
model = AutoModelForCausalLM.from_pretrained("jinee/note", load_in_4bit=True, device_map="auto")
|
| 39 |
tokenizer = AutoTokenizer.from_pretrained("jinee/note")
|
|
|
|
| 56 |
7. Discharge outcomes and treatment plan
|
| 57 |
8. Overall summary of at least 500 characters in lines including the above contents
|
| 58 |
'''
|
| 59 |
+
torch.cuda.empty_cache()
|
| 60 |
|
| 61 |
def generation(model, tokenizer, input_data):
|
| 62 |
pipe = pipeline('text-generation',
|