Update README.md
Browse files
README.md
CHANGED
@@ -69,6 +69,16 @@ Example
|
|
69 |
}
|
70 |
|
71 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
72 |
|
73 |
|
74 |
|
|
|
69 |
}
|
70 |
|
71 |
|
72 |
+
# Use a pipeline as a high-level helper
|
73 |
+
from transformers import pipeline
|
74 |
+
|
75 |
+
pipe = pipeline("text-classification", model="Zabihin/Symptom_to_Diagnosis")
|
76 |
+
|
77 |
+
Example:
|
78 |
+
result = pipe("I've been having headaches and migraines, and I can't sleep. My whole body shakes and twitches. Sometimes I feel lightheaded.")
|
79 |
+
result:
|
80 |
+
[{'label': 'drug reaction', 'score': 0.9489321112632751}]
|
81 |
+
|
82 |
|
83 |
|
84 |
|