Text Classification
Adapters
biology

Improve language tag

#2
by lbourdois - opened
Files changed (1) hide show
  1. README.md +54 -42
README.md CHANGED
@@ -1,43 +1,55 @@
1
- ---
2
- license: mit
3
- datasets:
4
- - sajjadhadi/disease-diagnosis-dataset
5
- base_model:
6
- - Qwen/Qwen2.5-3B
7
- pipeline_tag: text-classification
8
- tags:
9
- - biology
10
- language:
11
- - en
12
- library_name: adapter-transformers
13
- ---
14
-
15
- # Disease Diagnosis Adapter
16
-
17
- A fine-tuned adapter for the Qwen/Qwen2.5-3B 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
- The data is over-saturated in some diagnosis, I limit the number of diagnosis and take a limit number of them as training tags.
24
-
25
-
26
- ## Usage
27
-
28
- ```python
29
- from transformers import AutoModelForSequenceClassification, AutoTokenizer
30
-
31
- # Load model and tokenizer
32
- model_name = "naifenn/diagnosis-adapter"
33
- model = AutoModelForSequenceClassification.from_pretrained(model_name)
34
- tokenizer = AutoTokenizer.from_pretrained(model_name)
35
-
36
- # Example input
37
- text = "Patient presents with fever, cough, and fatigue for 3 days."
38
- inputs = tokenizer(text, return_tensors="pt")
39
-
40
- # Get prediction
41
- outputs = model(**inputs)
42
- prediction = outputs.logits.argmax(-1).item()
 
 
 
 
 
 
 
 
 
 
 
 
43
  print(f"Predicted diagnosis: {model.config.id2label[prediction]}")
 
1
+ ---
2
+ license: mit
3
+ datasets:
4
+ - sajjadhadi/disease-diagnosis-dataset
5
+ base_model:
6
+ - Qwen/Qwen2.5-3B
7
+ pipeline_tag: text-classification
8
+ tags:
9
+ - biology
10
+ language:
11
+ - zho
12
+ - eng
13
+ - fra
14
+ - spa
15
+ - por
16
+ - deu
17
+ - ita
18
+ - rus
19
+ - jpn
20
+ - kor
21
+ - vie
22
+ - tha
23
+ - ara
24
+ library_name: adapter-transformers
25
+ ---
26
+
27
+ # Disease Diagnosis Adapter
28
+
29
+ A fine-tuned adapter for the Qwen/Qwen2.5-3B model specialized in disease diagnosis and classification.
30
+ Trained through MLX and MPI, to test performance and accuracy.
31
+
32
+ ## Overview
33
+
34
+ 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).
35
+ The data is over-saturated in some diagnosis, I limit the number of diagnosis and take a limit number of them as training tags.
36
+
37
+
38
+ ## Usage
39
+
40
+ ```python
41
+ from transformers import AutoModelForSequenceClassification, AutoTokenizer
42
+
43
+ # Load model and tokenizer
44
+ model_name = "naifenn/diagnosis-adapter"
45
+ model = AutoModelForSequenceClassification.from_pretrained(model_name)
46
+ tokenizer = AutoTokenizer.from_pretrained(model_name)
47
+
48
+ # Example input
49
+ text = "Patient presents with fever, cough, and fatigue for 3 days."
50
+ inputs = tokenizer(text, return_tensors="pt")
51
+
52
+ # Get prediction
53
+ outputs = model(**inputs)
54
+ prediction = outputs.logits.argmax(-1).item()
55
  print(f"Predicted diagnosis: {model.config.id2label[prediction]}")