Text Classification
Transformers
Safetensors
English
emotion-classification
healthcare
distilbert
patient-doctor-conversations
clinical-AI
mental-health
Instructions to use StringJammer/patient-emotion-classifier with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use StringJammer/patient-emotion-classifier with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="StringJammer/patient-emotion-classifier")# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("StringJammer/patient-emotion-classifier", dtype="auto") - Notebooks
- Google Colab
- Kaggle
Upload folder using huggingface_hub
Browse files- see/app.py +1 -1
- see/inference.py +1 -1
- see/see_config.py +1 -1
see/app.py
CHANGED
|
@@ -74,7 +74,7 @@ def get_model_status():
|
|
| 74 |
return jsonify({
|
| 75 |
'success': True,
|
| 76 |
'loaded': classifier.is_loaded(),
|
| 77 |
-
'model_path': '/
|
| 78 |
})
|
| 79 |
|
| 80 |
|
|
|
|
| 74 |
return jsonify({
|
| 75 |
'success': True,
|
| 76 |
'loaded': classifier.is_loaded(),
|
| 77 |
+
'model_path': '../best_model'
|
| 78 |
})
|
| 79 |
|
| 80 |
|
see/inference.py
CHANGED
|
@@ -6,7 +6,7 @@ import os
|
|
| 6 |
import torch
|
| 7 |
|
| 8 |
# Model path
|
| 9 |
-
MODEL_SAVE_PATH = '/
|
| 10 |
|
| 11 |
# Emotion labels
|
| 12 |
EMOTION_LABELS = [
|
|
|
|
| 6 |
import torch
|
| 7 |
|
| 8 |
# Model path
|
| 9 |
+
MODEL_SAVE_PATH = '../best_model'
|
| 10 |
|
| 11 |
# Emotion labels
|
| 12 |
EMOTION_LABELS = [
|
see/see_config.py
CHANGED
|
@@ -5,7 +5,7 @@ Configuration File - Emotion Prediction Service
|
|
| 5 |
import os
|
| 6 |
|
| 7 |
# Model path - using trained model
|
| 8 |
-
MODEL_SAVE_PATH = '/
|
| 9 |
|
| 10 |
# Service port
|
| 11 |
PORT = 8002
|
|
|
|
| 5 |
import os
|
| 6 |
|
| 7 |
# Model path - using trained model
|
| 8 |
+
MODEL_SAVE_PATH = '../best_model'
|
| 9 |
|
| 10 |
# Service port
|
| 11 |
PORT = 8002
|