Text Classification
Adapters
biology
naifenn commited on
Commit
8a2da4f
·
verified ·
1 Parent(s): 1290f34

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +29 -1
README.md CHANGED
@@ -10,4 +10,32 @@ tags:
10
  language:
11
  - en
12
  library_name: adapter-transformers
13
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10
  language:
11
  - en
12
  library_name: adapter-transformers
13
+ ---
14
+
15
+ # Disease Diagnosis Adapter
16
+
17
+ A fine-tuned adapter for the Ministral-3b-instruct model specialized in disease diagnosis and classification.
18
+ Trained through MLX and MPI, to test performance and accuracy.
19
+
20
+ ## Overview
21
+
22
+ This adapter enhances the base Ministral-3b-instruct model to improve performance on medical diagnosis tasks. It was trained on the [disease-diagnosis-dataset](https://huggingface.co/datasets/sajjadhadi/disease-diagnosis-dataset).
23
+
24
+ ## Usage
25
+
26
+ ```python
27
+ from transformers import AutoModelForSequenceClassification, AutoTokenizer
28
+
29
+ # Load model and tokenizer
30
+ model_name = "naifenn/diagnosis-adapter"
31
+ model = AutoModelForSequenceClassification.from_pretrained(model_name)
32
+ tokenizer = AutoTokenizer.from_pretrained(model_name)
33
+
34
+ # Example input
35
+ text = "Patient presents with fever, cough, and fatigue for 3 days."
36
+ inputs = tokenizer(text, return_tensors="pt")
37
+
38
+ # Get prediction
39
+ outputs = model(**inputs)
40
+ prediction = outputs.logits.argmax(-1).item()
41
+ print(f"Predicted diagnosis: {model.config.id2label[prediction]}")