Spaces:
Runtime error
Runtime error
Update info.py
Browse files
info.py
CHANGED
@@ -1,94 +1,152 @@
|
|
1 |
-
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9 |
#### Symptoms
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
*
|
17 |
-
*
|
18 |
-
*
|
19 |
-
*
|
20 |
-
*
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
36 |
'''
|
37 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
38 |
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
* Headache
|
51 |
-
* New loss of taste or smell
|
52 |
-
* Sore throat
|
53 |
-
* Congestion or runny nose
|
54 |
-
* Nausea or vomiting
|
55 |
-
* Diarrhea
|
56 |
-
#### When to Seek Emergency Medical Attention
|
57 |
-
**Look for emergency warning signs* for COVID 19:**
|
58 |
-
* Trouble breathing
|
59 |
-
* Persistent pain or pressure in the chest
|
60 |
-
* New confusion
|
61 |
-
* Inability to wake or stay awake
|
62 |
-
* Pale, gray, or blue-colored skin, lips, or nail beds, depending on skin tone
|
63 |
'''
|
64 |
|
65 |
vit_base_patch_16 = '''
|
66 |
-
# vit-
|
67 |
This model is a fine-tuned version of [google/vit-base-patch16-224](https://huggingface.co/google/vit-base-patch16-224) on the imagefolder dataset.
|
68 |
It achieves the following results on the evaluation set:
|
69 |
-
- Loss: 0.
|
70 |
-
- Accuracy: 0.
|
|
|
|
|
|
|
71 |
### Training hyperparameters
|
72 |
The following hyperparameters were used during training:
|
73 |
-
- learning_rate:
|
74 |
-
- train_batch_size:
|
75 |
-
- eval_batch_size:
|
76 |
- seed: 42
|
77 |
-
-
|
78 |
-
-
|
79 |
-
-
|
80 |
-
-
|
81 |
-
-
|
82 |
-
- num_epochs: 3
|
83 |
-
### Training results
|
84 |
-
| Training Loss | Epoch | Step | Validation Loss | Accuracy |
|
85 |
-
|:-------------:|:-----:|:----:|:---------------:|:--------:|
|
86 |
-
| 0.2082 | 0.99 | 20 | 0.1462 | 0.9402 |
|
87 |
-
| 0.0832 | 1.98 | 40 | 0.0998 | 0.9658 |
|
88 |
-
| 0.0517 | 2.96 | 60 | 0.0938 | 0.9728 |
|
89 |
-
### Framework versions
|
90 |
-
- Transformers 4.38.2
|
91 |
-
- Pytorch 2.1.2
|
92 |
-
- Datasets 2.18.0
|
93 |
-
- Tokenizers 0.15.2
|
94 |
'''
|
|
|
1 |
+
akiec = '''
|
2 |
+
Actinic keratoses (akiec), also known as solar keratoses, are rough, scaly patches on the skin caused by years of sun exposure. These lesions are considered precancerous, as they have the potential to develop into skin cancer if left untreated.
|
3 |
+
|
4 |
+
#### Symptoms
|
5 |
+
Actinic keratoses typically appear as small, red, rough spots on sun-exposed areas of the skin, such as the face, ears, neck, scalp, chest, backs of hands, and forearms. They may be flat or raised and can range in color from pink to brown.
|
6 |
+
|
7 |
+
#### Signs and Symptoms
|
8 |
+
* Rough, scaly patches on the skin
|
9 |
+
* Red or pink spots that feel rough to the touch
|
10 |
+
* Itching or burning sensation
|
11 |
+
* Sometimes, a hard, wart-like surface
|
12 |
+
#### When to See a Dermatologist
|
13 |
+
It's important to see a dermatologist if you notice any new, changing, or persistent skin lesions, especially if they resemble actinic keratoses. Early detection and treatment can prevent the progression to skin cancer.
|
14 |
+
'''
|
15 |
+
|
16 |
+
|
17 |
+
bcc = '''
|
18 |
+
Basal cell carcinoma (BCC) is the most common type of skin cancer. It usually develops on areas of the skin exposed to the sun, such as the head, neck, and hands.
|
19 |
+
|
20 |
#### Symptoms
|
21 |
+
Basal cell carcinomas often appear as:
|
22 |
+
|
23 |
+
* A pearly or waxy bump
|
24 |
+
* A flat, flesh-colored or brown scar-like lesion
|
25 |
+
* A bleeding or scabbing sore that heals and returns
|
26 |
+
#### Signs and Symptoms
|
27 |
+
* Persistent, non-healing sore
|
28 |
+
* Shiny, pearly bump
|
29 |
+
* Pink growth with raised edges
|
30 |
+
* Red or brown patch that may be itchy or painful
|
31 |
+
* Scar-like lesion with irregular borders
|
32 |
+
#### When to See a Dermatologist
|
33 |
+
If you notice any new, changing, or persistent skin lesions, especially those that bleed, scab, or do not heal, it's essential to see a dermatologist for evaluation and possible biopsy.
|
34 |
+
'''
|
35 |
+
|
36 |
+
bkl = '''
|
37 |
+
Benign lesions of the keratosis type are non-cancerous growths on the skin that often result from sun exposure. While they are not cancerous, they may resemble precancerous or cancerous lesions and should be monitored by a dermatologist.
|
38 |
+
|
39 |
+
Symptoms
|
40 |
+
These lesions may present as:
|
41 |
+
|
42 |
+
Rough, scaly patches
|
43 |
+
Warty growths
|
44 |
+
Thickened, discolored areas of skin
|
45 |
+
Raised bumps
|
46 |
+
Signs and Symptoms
|
47 |
+
Rough or scaly texture
|
48 |
+
Irregular borders
|
49 |
+
Variable colors, including pink, brown, or tan
|
50 |
+
Slowly growing over time
|
51 |
+
When to See a Dermatologist
|
52 |
+
If you notice any new, changing, or unusual skin growths, it's important to have them evaluated by a dermatologist. While most benign lesions do not require treatment, they should be monitored for changes in size, shape, or color.
|
53 |
+
|
54 |
'''
|
55 |
|
56 |
+
df = '''
|
57 |
+
Dermatofibroma is a common benign skin lesion that usually appears as a small, firm bump on the skin. It is typically harmless but can sometimes resemble skin cancer or other serious conditions.
|
58 |
+
|
59 |
+
Symptoms
|
60 |
+
Dermatofibromas often present as:
|
61 |
+
|
62 |
+
Firm, raised bump
|
63 |
+
Pink, brown, or reddish color
|
64 |
+
Smooth or dimpled surface
|
65 |
+
Often found on the legs but can occur anywhere on the body
|
66 |
+
Signs and Symptoms
|
67 |
+
Firm, rubbery texture
|
68 |
+
Well-defined borders
|
69 |
+
Often less than 1 centimeter in size
|
70 |
+
Usually painless but may be tender to touch
|
71 |
+
When to See a Dermatologist
|
72 |
+
While dermatofibromas are usually harmless, any new, changing, or unusual skin lesions should be evaluated by a dermatologist to rule out skin cancer or other conditions.
|
73 |
+
'''
|
74 |
+
|
75 |
+
mel = '''
|
76 |
+
Melanoma is a type of skin cancer that develops from melanocytes, the cells that produce pigment in the skin. It can occur anywhere on the body, including areas not exposed to the sun.
|
77 |
+
|
78 |
+
Symptoms
|
79 |
+
Melanomas often appear as:
|
80 |
+
|
81 |
+
A change in an existing mole
|
82 |
+
A new, unusual growth or spot on the skin
|
83 |
+
Asymmetrical lesion with irregular borders
|
84 |
+
Varied colors, including shades of brown, black, red, blue, or white
|
85 |
+
Signs and Symptoms
|
86 |
+
Irregular, asymmetric shape
|
87 |
+
Irregular borders that may be scalloped or notched
|
88 |
+
Variable colors within the lesion
|
89 |
+
Diameter larger than a pencil eraser (6 millimeters) or evolving size, shape, or color
|
90 |
+
When to See a Dermatologist
|
91 |
+
If you notice any new, changing, or suspicious skin lesions, especially those with irregular features or rapid growth, it's essential to see a dermatologist promptly for evaluation and possible biopsy.
|
92 |
+
'''
|
93 |
+
|
94 |
+
nv='''
|
95 |
+
Melanocytic nevi, commonly known as moles, are benign growths on the skin composed of melanocytes. While most moles are harmless, some may develop into melanoma, a type of skin cancer.
|
96 |
+
|
97 |
+
Symptoms
|
98 |
+
Melanocytic nevi often appear as:
|
99 |
+
|
100 |
+
Small, round, or oval-shaped spots on the skin
|
101 |
+
Uniform in color, usually tan, brown, or black
|
102 |
+
Flat or raised with smooth or rough texture
|
103 |
+
Often appear during childhood or adolescence
|
104 |
+
Signs and Symptoms
|
105 |
+
Regular shape with well-defined borders
|
106 |
+
Uniform color throughout the lesion
|
107 |
+
Usually less than 6 millimeters in diameter
|
108 |
+
Typically remain stable in size, shape, and color over time
|
109 |
+
When to See a Dermatologist
|
110 |
+
While most moles are harmless, any new, changing, or unusual skin lesions should be evaluated by a dermatologist to rule out skin cancer or other conditions.
|
111 |
+
'''
|
112 |
+
|
113 |
+
vasc = '''
|
114 |
+
Vascular lesions are abnormal growths of blood vessels in the skin. While most are benign, some may indicate an underlying medical condition or require treatment for cosmetic reasons.
|
115 |
+
|
116 |
+
Symptoms
|
117 |
+
Vascular lesions may present as:
|
118 |
|
119 |
+
Red, purple, or blue discoloration of the skin
|
120 |
+
Flat or raised lesions
|
121 |
+
Pain, itching, or burning sensation
|
122 |
+
Rapid growth or change in appearance
|
123 |
+
Signs and Symptoms
|
124 |
+
Discoloration of the skin
|
125 |
+
Varied shapes and sizes
|
126 |
+
Smooth or irregular texture
|
127 |
+
Bleeding or ulceration in severe cases
|
128 |
+
When to See a Dermatologist
|
129 |
+
If you notice any new, changing, or unusual skin lesions, especially those with rapid growth or bleeding, it's essential to see a dermatologist for evaluation and possible treatment.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
130 |
'''
|
131 |
|
132 |
vit_base_patch_16 = '''
|
133 |
+
# vit-beta2-0.99
|
134 |
This model is a fine-tuned version of [google/vit-base-patch16-224](https://huggingface.co/google/vit-base-patch16-224) on the imagefolder dataset.
|
135 |
It achieves the following results on the evaluation set:
|
136 |
+
- Loss: 0.5248
|
137 |
+
- Accuracy: 0.8623
|
138 |
+
- Precision: 0.8584
|
139 |
+
- Recall: 0.8623
|
140 |
+
- F1: 0.8596
|
141 |
### Training hyperparameters
|
142 |
The following hyperparameters were used during training:
|
143 |
+
- learning_rate: 0.0001
|
144 |
+
- train_batch_size: 16
|
145 |
+
- eval_batch_size: 8
|
146 |
- seed: 42
|
147 |
+
- optimizer: Adam with betas=(0.9,0.99) and epsilon=1e-08
|
148 |
+
- lr_scheduler_type: cosine
|
149 |
+
- lr_scheduler_warmup_steps: 1733
|
150 |
+
- num_epochs: 100
|
151 |
+
- mixed_precision_training: Native AMP
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
152 |
'''
|