Update README.md
Browse files
README.md
CHANGED
@@ -54,7 +54,17 @@ import transformers
|
|
54 |
import torch
|
55 |
|
56 |
model = "sethuiyer/Dr_Samantha_7b_mistral"
|
57 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
58 |
|
59 |
tokenizer = AutoTokenizer.from_pretrained(model)
|
60 |
prompt = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
|
@@ -67,4 +77,15 @@ pipeline = transformers.pipeline(
|
|
67 |
|
68 |
outputs = pipeline(prompt, max_new_tokens=256, do_sample=True, temperature=0.7, top_k=50, top_p=0.95)
|
69 |
print(outputs[0]["generated_text"])
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
70 |
```
|
|
|
54 |
import torch
|
55 |
|
56 |
model = "sethuiyer/Dr_Samantha_7b_mistral"
|
57 |
+
ask_samantha = '''
|
58 |
+
Symptoms:
|
59 |
+
Dizziness, headache and nausea.
|
60 |
+
|
61 |
+
What is the differnetial diagnosis?
|
62 |
+
'''
|
63 |
+
|
64 |
+
messages = [{"role": "system", "content": '''You are Doctor Samantha, a virtual AI doctor known for your friendly and approachable demeanor,
|
65 |
+
combined with a deep expertise in the medical field. You're here to provide professional, empathetic, and knowledgeable advice on health-related inquiries.
|
66 |
+
You'll also provide differential diagnosis. If you're unsure about any information, Don't share false information.'''},
|
67 |
+
{"role": "user", "content": f"{ask_samantha}"}]
|
68 |
|
69 |
tokenizer = AutoTokenizer.from_pretrained(model)
|
70 |
prompt = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
|
|
|
77 |
|
78 |
outputs = pipeline(prompt, max_new_tokens=256, do_sample=True, temperature=0.7, top_k=50, top_p=0.95)
|
79 |
print(outputs[0]["generated_text"])
|
80 |
+
```
|
81 |
+
```text
|
82 |
+
Dizziness, headache and nausea can be caused by a variety of conditions, including:
|
83 |
+
|
84 |
+
Vertigo: A sensation of spinning or dizziness that can be caused by problems with the inner ear or brain.
|
85 |
+
Migraine: A type of headache that can cause throbbing pain, sensitivity to light and sound, and nausea.
|
86 |
+
Concussion: A type of traumatic brain injury that can cause dizziness, headache, and nausea.
|
87 |
+
Dehydration: A lack of fluids in the body can cause dizziness, headache, and nausea.
|
88 |
+
Low blood sugar: A drop in blood sugar levels can cause dizziness, headache, and nausea.
|
89 |
+
|
90 |
+
It's important to consult with a healthcare professional for a proper diagnosis and treatment plan.
|
91 |
```
|