Update app.py
Browse files
app.py
CHANGED
|
@@ -111,27 +111,142 @@ templates = {
|
|
| 111 |
|
| 112 |
EXPLANATIONS = {
|
| 113 |
"medical": {
|
| 114 |
-
|
| 115 |
-
|
| 116 |
-
|
| 117 |
-
|
| 118 |
-
|
| 119 |
-
|
| 120 |
-
|
| 121 |
-
|
| 122 |
-
|
| 123 |
-
|
| 124 |
-
|
| 125 |
-
|
| 126 |
-
|
| 127 |
-
|
| 128 |
-
|
| 129 |
-
|
| 130 |
-
|
| 131 |
-
|
| 132 |
-
|
| 133 |
-
|
| 134 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 135 |
}
|
| 136 |
|
| 137 |
# --------------------------------------------------
|
|
|
|
| 111 |
|
| 112 |
EXPLANATIONS = {
|
| 113 |
"medical": {
|
| 114 |
+
"pneumonia":
|
| 115 |
+
"""
|
| 116 |
+
The uploaded chest X-ray image appears to indicate pneumonia.
|
| 117 |
+
Pneumonia is a lung infection that causes inflammation in the air sacs, which may fill with fluid or pus.
|
| 118 |
+
Common visual indicators in X-rays include cloudy regions or opacities in the lung fields.
|
| 119 |
+
Early detection is important because pneumonia can affect breathing and oxygen exchange.
|
| 120 |
+
Medical professionals typically confirm the diagnosis using radiological evaluation and clinical symptoms.
|
| 121 |
+
""",
|
| 122 |
+
|
| 123 |
+
"Normal":
|
| 124 |
+
"""
|
| 125 |
+
The chest X-ray image appears to show healthy lungs with no visible infection.
|
| 126 |
+
Normal lungs in radiographs usually show clear lung fields without abnormal opacities.
|
| 127 |
+
The diaphragm and lung boundaries appear well defined in healthy scans.
|
| 128 |
+
This suggests that the lungs are functioning normally without signs of pneumonia or infection.
|
| 129 |
+
A medical professional would still review the image alongside patient symptoms for confirmation.
|
| 130 |
+
"""
|
| 131 |
+
},
|
| 132 |
+
|
| 133 |
+
"skin_disease": {
|
| 134 |
+
|
| 135 |
+
"eczema":
|
| 136 |
+
"""
|
| 137 |
+
The image appears to show signs consistent with eczema.
|
| 138 |
+
Eczema is a skin condition that causes redness, inflammation, dryness, and itching.
|
| 139 |
+
It often appears as irritated patches of skin with uneven texture.
|
| 140 |
+
Environmental triggers, allergies, or immune responses may cause flare-ups.
|
| 141 |
+
Dermatologists typically diagnose eczema through visual inspection and medical history.
|
| 142 |
+
""",
|
| 143 |
+
|
| 144 |
+
"Melanoma":
|
| 145 |
+
"""
|
| 146 |
+
The image may contain characteristics associated with melanoma.
|
| 147 |
+
Melanoma is a serious form of skin cancer that develops in pigment-producing cells.
|
| 148 |
+
Visual indicators can include dark, irregularly shaped lesions with uneven borders.
|
| 149 |
+
Early detection is critical because melanoma can spread to other organs.
|
| 150 |
+
A dermatologist should examine suspicious lesions and may perform a biopsy.
|
| 151 |
+
""",
|
| 152 |
+
|
| 153 |
+
"psoriasis":
|
| 154 |
+
"""
|
| 155 |
+
The image appears to show features consistent with psoriasis.
|
| 156 |
+
Psoriasis is a chronic autoimmune condition that causes rapid skin cell buildup.
|
| 157 |
+
This results in thick, red patches with silvery scales on the skin.
|
| 158 |
+
The condition may cause itching or discomfort depending on severity.
|
| 159 |
+
Medical treatment usually focuses on reducing inflammation and slowing skin cell growth.
|
| 160 |
+
""",
|
| 161 |
+
|
| 162 |
+
"Normal Skin":
|
| 163 |
+
"""
|
| 164 |
+
The image appears to show healthy skin without visible dermatological abnormalities.
|
| 165 |
+
Normal skin typically has an even tone and smooth surface texture.
|
| 166 |
+
There are no visible lesions, scales, or inflammatory patches in the image.
|
| 167 |
+
This suggests that the skin does not currently show signs of common dermatological diseases.
|
| 168 |
+
However, regular skin monitoring is still recommended for early detection of conditions.
|
| 169 |
+
"""
|
| 170 |
+
},
|
| 171 |
+
|
| 172 |
+
"satellite": {
|
| 173 |
+
|
| 174 |
+
"HIGHWAY":
|
| 175 |
+
"""
|
| 176 |
+
The satellite image appears to contain a highway or major roadway.
|
| 177 |
+
Highways are large transportation corridors designed for high-speed vehicle movement.
|
| 178 |
+
From satellite imagery, they appear as long linear structures crossing landscapes.
|
| 179 |
+
They connect cities, industrial zones, and transportation hubs.
|
| 180 |
+
Remote sensing is commonly used to monitor infrastructure development and urban planning.
|
| 181 |
+
""",
|
| 182 |
+
|
| 183 |
+
"RIVER":
|
| 184 |
+
"""
|
| 185 |
+
The satellite image likely shows a river or flowing water body.
|
| 186 |
+
Rivers appear as long winding structures that transport water across landscapes.
|
| 187 |
+
They are important for agriculture, ecosystems, and human settlements.
|
| 188 |
+
Satellite imagery is often used to monitor river flow, flooding, and environmental changes.
|
| 189 |
+
Remote sensing helps researchers track water resources over time.
|
| 190 |
+
""",
|
| 191 |
+
|
| 192 |
+
"FOREST":
|
| 193 |
+
"""
|
| 194 |
+
The satellite image appears to contain dense forest vegetation.
|
| 195 |
+
Forests typically appear as large green areas with textured canopy patterns in aerial imagery.
|
| 196 |
+
They play a critical role in maintaining biodiversity and regulating climate.
|
| 197 |
+
Satellite monitoring is widely used to detect deforestation and vegetation changes.
|
| 198 |
+
Remote sensing helps scientists study environmental conservation.
|
| 199 |
+
"""
|
| 200 |
+
},
|
| 201 |
+
|
| 202 |
+
"agriculture": {
|
| 203 |
+
|
| 204 |
+
"POWDERY_MILDEW":
|
| 205 |
+
"""
|
| 206 |
+
The plant leaf in the image appears to show powdery mildew infection.
|
| 207 |
+
Powdery mildew is a fungal disease that creates white powder-like patches on leaves.
|
| 208 |
+
It can reduce photosynthesis and weaken plant health if untreated.
|
| 209 |
+
This disease spreads quickly in humid environments with limited airflow.
|
| 210 |
+
Farmers usually manage it using fungicides and improved crop management practices.
|
| 211 |
+
""",
|
| 212 |
+
|
| 213 |
+
"RUST":
|
| 214 |
+
"""
|
| 215 |
+
The plant leaf shows symptoms consistent with rust disease.
|
| 216 |
+
Rust infections create orange or brown spots on the leaf surface.
|
| 217 |
+
This fungal disease spreads through airborne spores.
|
| 218 |
+
Severe infections can reduce crop yield and plant health.
|
| 219 |
+
Agricultural monitoring helps detect plant diseases early for better crop protection.
|
| 220 |
+
""",
|
| 221 |
+
|
| 222 |
+
"EARLY BLIGHT":
|
| 223 |
+
"""
|
| 224 |
+
The leaf may show symptoms of early blight disease.
|
| 225 |
+
Early blight is a fungal infection commonly affecting tomato and potato plants.
|
| 226 |
+
It often produces circular brown spots with concentric rings on leaves.
|
| 227 |
+
If left untreated, the disease may spread across the plant.
|
| 228 |
+
Proper crop rotation and fungicide treatment help control early blight.
|
| 229 |
+
""",
|
| 230 |
+
|
| 231 |
+
"LATE BLIGHT":
|
| 232 |
+
"""
|
| 233 |
+
The leaf may be affected by late blight disease.
|
| 234 |
+
Late blight is a severe plant disease that affects crops such as potatoes and tomatoes.
|
| 235 |
+
Symptoms often include dark lesions and rapid leaf decay.
|
| 236 |
+
The disease spreads quickly in cool and humid conditions.
|
| 237 |
+
Early detection helps farmers take preventive measures to protect crops.
|
| 238 |
+
""",
|
| 239 |
+
|
| 240 |
+
"HEALTHY":
|
| 241 |
+
"""
|
| 242 |
+
The plant leaf appears healthy with no visible disease symptoms.
|
| 243 |
+
Healthy leaves typically have a uniform green color and smooth surface.
|
| 244 |
+
There are no visible fungal spots, discoloration, or lesions.
|
| 245 |
+
This indicates that the plant is likely growing under good conditions.
|
| 246 |
+
Regular monitoring helps maintain crop health and productivity.
|
| 247 |
+
"""
|
| 248 |
+
}
|
| 249 |
+
|
| 250 |
}
|
| 251 |
|
| 252 |
# --------------------------------------------------
|