proper example
Browse files
README.md
CHANGED
@@ -60,10 +60,10 @@ You can use the model for inference tasks like question-answering and medical di
|
|
60 |
|
61 |
from transformers import pipeline
|
62 |
|
63 |
-
|
64 |
question = "What are the symptoms of diabetes?"
|
65 |
context = "Diabetes is a metabolic disease that causes high blood sugar. The symptoms include increased thirst, frequent urination, and unexplained weight loss."
|
66 |
-
answer =
|
67 |
print(answer)
|
68 |
```
|
69 |
|
|
|
60 |
|
61 |
from transformers import pipeline
|
62 |
|
63 |
+
pl = pipeline("text-generation", model="medalpaca/medalpaca-13b", tokenizer="medalpaca/medalpaca-13b")
|
64 |
question = "What are the symptoms of diabetes?"
|
65 |
context = "Diabetes is a metabolic disease that causes high blood sugar. The symptoms include increased thirst, frequent urination, and unexplained weight loss."
|
66 |
+
answer = pl(f"Context: {context}\n\nQuestion: {question}\n\nAnswer: ")
|
67 |
print(answer)
|
68 |
```
|
69 |
|