Medical & Healthcare
Collection
6 items
•
Updated
trained using dataset Credit :wiki_medical_terms
from transformers import AutoTokenizer
import transformers
import torch
model = "mychen76/llama2_medical_terms"
tokenizer = AutoTokenizer.from_pretrained(model)
pipeline = transformers.pipeline(
"text-generation",
model=model,
torch_dtype=torch.float16,
device_map="auto",
)
sequences = pipeline(
'Question:\nWhat is Occipital neuralgia and explain in detail?\nAnswer:\n',
do_sample=True,
top_k=10,
num_return_sequences=1,
eos_token_id=tokenizer.eos_token_id,
max_length=200,
)
for seq in sequences:
print(f"Result: {seq['generated_text']}")
Question: What is Occipital neuralgia and explain in detail? Answer: Occipital neuralgia is a type of headache disorder that is caused by pain in the occipital nerves, which are located in the back of the head and neck. These nerves transmit sensory information from the head and face to the brain. When the occipital nerves become irritated or compressed, it can cause intense pain in the back of the head, neck, and sometimes the eyes.
Causes: Occipital neuralgia can be caused by a variety of factors, including: