Edit model card

Symptom_to_Diagnosis

This model is a fine-tuned version of bert-base-cased on this dataset (https://huggingface.co/datasets/gretelai/symptom_to_diagnosis).

Model description

Model Description This model is a fine-tuned version of the bert-base-cased architecture, specifically designed for text classification tasks related to diagnosing diseases from symptoms. The primary objective is to analyze natural language descriptions of symptoms and predict one of 22 corresponding diagnoses.

Dataset Information

The model was trained on the Gretel/symptom_to_diagnosis dataset, which consists of 1,065 symptom descriptions in the English language, each labeled with one of the 22 possible diagnoses. The dataset focuses on fine-grained single-domain diagnosis, making it suitable for tasks that require detailed classification based on symptom descriptions. Example

{ "output_text": "drug reaction", "input_text": "I've been having headaches and migraines, and I can't sleep. My whole body shakes and twitches. Sometimes I feel lightheaded." }

Use a pipeline as a high-level helper

from transformers import pipeline

pipe = pipeline("text-classification", model="Zabihin/Symptom_to_Diagnosis")

Example:
result = pipe("I've been having headaches and migraines, and I can't sleep. My whole body shakes and twitches. Sometimes I feel lightheaded.")
result:

[{'label': 'drug reaction', 'score': 0.9489321112632751}]

or

from transformers import pipeline

# Load the model
classifier = pipeline("text-classification", model="Zabihin/Symptom_to_Diagnosis", tokenizer="Zabihin/Symptom_to_Diagnosis")

# Example input text
input_text = "I've been having headaches and migraines, and I can't sleep. My whole body shakes and twitches. Sometimes I feel lightheaded."

# Get the predicted label
result = classifier(input_text)

# Print the predicted label
predicted_label = result[0]['label']
print("Predicted Label:", predicted_label)

Predicted Label: drug reaction

Framework versions

  • Transformers 4.35.2
  • TensorFlow 2.15.0
  • Datasets 2.15.0
  • Tokenizers 0.15.0
Downloads last month
139
Inference Examples
This model does not have enough activity to be deployed to Inference API (serverless) yet. Increase its social visibility and check back later, or deploy to Inference Endpoints (dedicated) instead.

Model tree for Zabihin/Symptom_to_Diagnosis

Finetuned
(1821)
this model

Dataset used to train Zabihin/Symptom_to_Diagnosis

Space using Zabihin/Symptom_to_Diagnosis 1

Evaluation results