Updated the examples sections of the model card
Browse files
README.md
CHANGED
@@ -16,10 +16,16 @@ tags:
|
|
16 |
- depression
|
17 |
- text classification
|
18 |
widget:
|
19 |
-
- text: "
|
20 |
example_title: "Example 1"
|
21 |
-
- text: "I
|
22 |
example_title: "Example 2"
|
|
|
|
|
|
|
|
|
|
|
|
|
23 |
---
|
24 |
|
25 |
# Model Card for Zakia/distilbert-drugscom_depression_reviews
|
@@ -75,15 +81,19 @@ def print_predictions(review_text, model, tokenizer):
|
|
75 |
predictions = F.softmax(outputs.logits, dim=-1)
|
76 |
# LABEL_0 is for low quality and LABEL_1 for high quality
|
77 |
print(f"Review: \"{review_text}\"")
|
78 |
-
print(f"Prediction: {{'LABEL_0 (Low
|
79 |
-
|
80 |
-
#
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
|
|
|
|
|
|
|
|
87 |
```
|
88 |
|
89 |
## Training Details
|
|
|
16 |
- depression
|
17 |
- text classification
|
18 |
widget:
|
19 |
+
- text: "After starting this new treatment, I felt an immediate improvement in my mood and energy levels."
|
20 |
example_title: "Example 1"
|
21 |
+
- text: "I was apprehensive about the side effects of the medication, but thankfully I haven't experienced any."
|
22 |
example_title: "Example 2"
|
23 |
+
- text: "This medication has changed my life for the better. I've experienced no side effects and my symptoms of depression have significantly decreased."
|
24 |
+
example_title: "Example 3"
|
25 |
+
- text: "I've had a terrible experience with this medication. It made me feel nauseous and I didn't notice any improvement in my condition."
|
26 |
+
example_title: "Example 4"
|
27 |
+
- text: "Since I began taking L-methylfolate, my experience has been overwhelmingly positive with noticeable improvements."
|
28 |
+
example_title: "Example 5"
|
29 |
---
|
30 |
|
31 |
# Model Card for Zakia/distilbert-drugscom_depression_reviews
|
|
|
81 |
predictions = F.softmax(outputs.logits, dim=-1)
|
82 |
# LABEL_0 is for low quality and LABEL_1 for high quality
|
83 |
print(f"Review: \"{review_text}\"")
|
84 |
+
print(f"Prediction: {{'LABEL_0 (Low Quality)': {predictions[0][0].item():.4f}, 'LABEL_1 (High Quality)': {predictions[0][1].item():.4f}}}\n")
|
85 |
+
|
86 |
+
# Example usage for various scenarios
|
87 |
+
example_reviews = [
|
88 |
+
"After starting this new treatment, I felt an immediate improvement in my mood and energy levels.",
|
89 |
+
"I was apprehensive about the side effects of the medication, but thankfully I haven't experienced any.",
|
90 |
+
"This medication has changed my life for the better. I've experienced no side effects and my symptoms of depression have significantly decreased.",
|
91 |
+
"I've had a terrible experience with this medication. It made me feel nauseous and I didn't notice any improvement in my condition.",
|
92 |
+
"Since I began taking L-methylfolate, my experience has been overwhelmingly positive with noticeable improvements."
|
93 |
+
]
|
94 |
+
|
95 |
+
for review in example_reviews:
|
96 |
+
print_predictions(review, model, tokenizer)
|
97 |
```
|
98 |
|
99 |
## Training Details
|