Ellie5757575757 commited on
Commit
2ed8f11
·
verified ·
1 Parent(s): 71166dd

Update config.json

Browse files
Files changed (1) hide show
  1. config.json +63 -166
config.json CHANGED
@@ -1,166 +1,63 @@
1
- {
2
- "model_name": "microsoft/BiomedNLP-PubMedBERT-base-uncased-abstract-fulltext",
3
- "num_labels": 9,
4
- "aphasia_types_mapping": {
5
- "BROCA": 0,
6
- "TRANSMOTOR": 1,
7
- "NOTAPHASICBYWAB": 2,
8
- "CONDUCTION": 3,
9
- "WERNICKE": 4,
10
- "ANOMIC": 5,
11
- "GLOBAL": 6,
12
- "ISOLATION": 7,
13
- "TRANSSENSORY": 8
14
- },
15
- "training_args": {
16
- "output_dir": "./adaptive_aphasia_model",
17
- "overwrite_output_dir": false,
18
- "do_train": false,
19
- "do_eval": true,
20
- "do_predict": false,
21
- "eval_strategy": "epoch",
22
- "prediction_loss_only": false,
23
- "per_device_train_batch_size": 10,
24
- "per_device_eval_batch_size": 10,
25
- "per_gpu_train_batch_size": null,
26
- "per_gpu_eval_batch_size": null,
27
- "gradient_accumulation_steps": 4,
28
- "eval_accumulation_steps": null,
29
- "eval_delay": 0,
30
- "torch_empty_cache_steps": null,
31
- "learning_rate": 0.0005,
32
- "weight_decay": 0.01,
33
- "adam_beta1": 0.9,
34
- "adam_beta2": 0.999,
35
- "adam_epsilon": 1e-08,
36
- "max_grad_norm": 1.0,
37
- "num_train_epochs": 500,
38
- "max_steps": -1,
39
- "lr_scheduler_type": "linear",
40
- "lr_scheduler_kwargs": {},
41
- "warmup_ratio": 0.1,
42
- "warmup_steps": 0,
43
- "log_level": "passive",
44
- "log_level_replica": "warning",
45
- "log_on_each_node": true,
46
- "logging_dir": "./adaptive_aphasia_model/runs/Aug06_00-31-47_ikm-gpu-9104",
47
- "logging_strategy": "steps",
48
- "logging_first_step": false,
49
- "logging_steps": 50,
50
- "logging_nan_inf_filter": true,
51
- "save_strategy": "epoch",
52
- "save_steps": 500,
53
- "save_total_limit": 3,
54
- "save_safetensors": true,
55
- "save_on_each_node": false,
56
- "save_only_model": false,
57
- "restore_callback_states_from_checkpoint": false,
58
- "no_cuda": false,
59
- "use_cpu": false,
60
- "use_mps_device": false,
61
- "seed": 42,
62
- "data_seed": null,
63
- "jit_mode_eval": false,
64
- "use_ipex": false,
65
- "bf16": false,
66
- "fp16": false,
67
- "fp16_opt_level": "O1",
68
- "half_precision_backend": "auto",
69
- "bf16_full_eval": false,
70
- "fp16_full_eval": false,
71
- "tf32": null,
72
- "local_rank": 1,
73
- "ddp_backend": null,
74
- "tpu_num_cores": null,
75
- "tpu_metrics_debug": false,
76
- "debug": [],
77
- "dataloader_drop_last": true,
78
- "eval_steps": null,
79
- "dataloader_num_workers": 0,
80
- "dataloader_prefetch_factor": null,
81
- "past_index": -1,
82
- "run_name": "./adaptive_aphasia_model",
83
- "disable_tqdm": false,
84
- "remove_unused_columns": false,
85
- "label_names": null,
86
- "load_best_model_at_end": true,
87
- "metric_for_best_model": "eval_f1",
88
- "greater_is_better": true,
89
- "ignore_data_skip": false,
90
- "fsdp": [],
91
- "fsdp_min_num_params": 0,
92
- "fsdp_config": {
93
- "min_num_params": 0,
94
- "xla": false,
95
- "xla_fsdp_v2": false,
96
- "xla_fsdp_grad_ckpt": false
97
- },
98
- "fsdp_transformer_layer_cls_to_wrap": null,
99
- "accelerator_config": {
100
- "split_batches": false,
101
- "dispatch_batches": null,
102
- "even_batches": true,
103
- "use_seedable_sampler": true,
104
- "non_blocking": false,
105
- "gradient_accumulation_kwargs": null
106
- },
107
- "deepspeed": null,
108
- "label_smoothing_factor": 0.0,
109
- "optim": "adamw_torch",
110
- "optim_args": null,
111
- "adafactor": false,
112
- "group_by_length": false,
113
- "length_column_name": "length",
114
- "report_to": [],
115
- "ddp_find_unused_parameters": null,
116
- "ddp_bucket_cap_mb": null,
117
- "ddp_broadcast_buffers": null,
118
- "dataloader_pin_memory": true,
119
- "dataloader_persistent_workers": false,
120
- "skip_memory_metrics": true,
121
- "use_legacy_prediction_loop": false,
122
- "push_to_hub": false,
123
- "resume_from_checkpoint": null,
124
- "hub_model_id": null,
125
- "hub_strategy": "every_save",
126
- "hub_token": "<HUB_TOKEN>",
127
- "hub_private_repo": null,
128
- "hub_always_push": false,
129
- "gradient_checkpointing": false,
130
- "gradient_checkpointing_kwargs": null,
131
- "include_inputs_for_metrics": false,
132
- "include_for_metrics": [],
133
- "eval_do_concat_batches": true,
134
- "fp16_backend": "auto",
135
- "push_to_hub_model_id": null,
136
- "push_to_hub_organization": null,
137
- "push_to_hub_token": "<PUSH_TO_HUB_TOKEN>",
138
- "mp_parameters": "",
139
- "auto_find_batch_size": false,
140
- "full_determinism": false,
141
- "torchdynamo": null,
142
- "ray_scope": "last",
143
- "ddp_timeout": 1800,
144
- "torch_compile": false,
145
- "torch_compile_backend": null,
146
- "torch_compile_mode": null,
147
- "include_tokens_per_second": false,
148
- "include_num_input_tokens_seen": false,
149
- "neftune_noise_alpha": null,
150
- "optim_target_modules": null,
151
- "batch_eval_metrics": false,
152
- "eval_on_start": false,
153
- "use_liger_kernel": false,
154
- "eval_use_gather_object": false,
155
- "average_tokens_across_devices": false
156
- },
157
- "adaptive_lr_config": {
158
- "adaptive_lr": true,
159
- "lr_patience": 3,
160
- "lr_factor": 0.8,
161
- "lr_increase_factor": 1.2,
162
- "min_lr": 1e-06,
163
- "max_lr": 0.001,
164
- "oscillation_amplitude": 0.1
165
- }
166
- }
 
1
+ ---
2
+ title: Aphasia Classifier
3
+ emoji: 🧠
4
+ colorFrom: blue
5
+ colorTo: purple
6
+ sdk: gradio
7
+ sdk_version: "4.44.0"
8
+ app_file: app.py
9
+ pinned: false
10
+ license: mit
11
+ short_description: AI-powered aphasia severity classification using fine-tuned BioBERT
12
+ tags:
13
+ - medical
14
+ - nlp
15
+ - aphasia
16
+ - biobert
17
+ - classification
18
+ - speech-therapy
19
+ - healthcare
20
+ models:
21
+ - dmis-lab/biobert-base-cased-v1.1
22
+ ---
23
+
24
+ # Aphasia Classifier 🧠
25
+
26
+ An AI-powered application for classifying aphasia severity levels using a fine-tuned BioBERT model.
27
+
28
+ ## Features
29
+
30
+ - **Speech Analysis Pipeline**: Text → CHA Format → JSON → BioBERT Classification
31
+ - **Severity Classification**: Normal, Mild, Moderate, Severe aphasia levels
32
+ - **Confidence Scoring**: Detailed probability distributions for each class
33
+ - **Professional Interface**: Medical-grade UI with multiple output views
34
+ - **Real-time Processing**: Complete analysis in seconds
35
+
36
+ ## How to Use
37
+
38
+ 1. Enter a speech sample in the text area
39
+ 2. Click "Analyze Speech" to process through the pipeline
40
+ 3. View results across multiple tabs:
41
+ - **Results**: Formatted analysis with confidence scores
42
+ - **CHA Format**: Clinical CHAT format output
43
+ - **JSON Data**: Structured data representation
44
+ - **Raw Classification**: Complete model output
45
+
46
+ ## Model Information
47
+
48
+ - **Base Model**: BioBERT (dmis-lab/biobert-base-cased-v1.1)
49
+ - **Fine-tuning**: Specialized for aphasia severity classification
50
+ - **Input**: Natural language speech samples
51
+ - **Output**: 4-class severity classification with confidence scores
52
+
53
+ ## Disclaimer
54
+
55
+ ⚠️ This tool is for research and educational purposes only. It should not be used as a substitute for professional medical diagnosis or treatment. Always consult with qualified healthcare professionals for medical advice.
56
+
57
+ ## Technical Pipeline
58
+
59
+ ```
60
+ Text Input → CHA Formatting → JSON Structure → BioBERT Model → Classification Results
61
+ ```
62
+
63
+ Built with Gradio and Transformers library.