Update README.md
Browse files
README.md
CHANGED
@@ -70,6 +70,7 @@ Example
|
|
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")
|
@@ -79,10 +80,11 @@ result = pipe("I've been having headaches and migraines, and I can't sleep. My w
|
|
79 |
result:
|
80 |
|
81 |
[{'label': 'drug reaction', 'score': 0.9489321112632751}]
|
|
|
82 |
|
83 |
or
|
84 |
|
85 |
-
|
86 |
from transformers import pipeline
|
87 |
|
88 |
# Load the model
|
@@ -99,7 +101,7 @@ predicted_label = result[0]['label']
|
|
99 |
print("Predicted Label:", predicted_label)
|
100 |
|
101 |
Predicted Label: drug reaction
|
102 |
-
|
103 |
|
104 |
|
105 |
### Framework versions
|
|
|
70 |
|
71 |
|
72 |
# Use a pipeline as a high-level helper
|
73 |
+
```
|
74 |
from transformers import pipeline
|
75 |
|
76 |
pipe = pipeline("text-classification", model="Zabihin/Symptom_to_Diagnosis")
|
|
|
80 |
result:
|
81 |
|
82 |
[{'label': 'drug reaction', 'score': 0.9489321112632751}]
|
83 |
+
```
|
84 |
|
85 |
or
|
86 |
|
87 |
+
```
|
88 |
from transformers import pipeline
|
89 |
|
90 |
# Load the model
|
|
|
101 |
print("Predicted Label:", predicted_label)
|
102 |
|
103 |
Predicted Label: drug reaction
|
104 |
+
```
|
105 |
|
106 |
|
107 |
### Framework versions
|