Spaces:
Sleeping
Sleeping
Update app.py
Browse filesChange disease name
app.py
CHANGED
|
@@ -10,13 +10,23 @@ import gradio as gr
|
|
| 10 |
DEVICE = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
| 11 |
|
| 12 |
# ==============================
|
| 13 |
-
# 類別名稱(14 類
|
| 14 |
# ==============================
|
| 15 |
class_names = [
|
| 16 |
-
"
|
| 17 |
-
"
|
| 18 |
-
"
|
| 19 |
-
"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 20 |
]
|
| 21 |
num_classes = len(class_names) # 14
|
| 22 |
|
|
@@ -59,8 +69,8 @@ iface = gr.Interface(
|
|
| 59 |
fn=predict,
|
| 60 |
inputs=gr.Image(type="pil"),
|
| 61 |
outputs=gr.Label(num_top_classes=1),
|
| 62 |
-
title="
|
| 63 |
-
description="
|
| 64 |
)
|
| 65 |
|
| 66 |
iface.launch()
|
|
|
|
| 10 |
DEVICE = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
| 11 |
|
| 12 |
# ==============================
|
| 13 |
+
# 類別名稱(14 類英文疾病)
|
| 14 |
# ==============================
|
| 15 |
class_names = [
|
| 16 |
+
"Actinic keratoses",
|
| 17 |
+
"Basal cell carcinoma",
|
| 18 |
+
"Benign keratosis-like-lesions",
|
| 19 |
+
"Chickenpox",
|
| 20 |
+
"Cowpox",
|
| 21 |
+
"Dermatofibroma",
|
| 22 |
+
"Healthy",
|
| 23 |
+
"HFMD",
|
| 24 |
+
"Measles",
|
| 25 |
+
"Melanocytic nevi",
|
| 26 |
+
"Melanoma",
|
| 27 |
+
"Monkeypox",
|
| 28 |
+
"Squamous cell carcinoma",
|
| 29 |
+
"Vascular lesions"
|
| 30 |
]
|
| 31 |
num_classes = len(class_names) # 14
|
| 32 |
|
|
|
|
| 69 |
fn=predict,
|
| 70 |
inputs=gr.Image(type="pil"),
|
| 71 |
outputs=gr.Label(num_top_classes=1),
|
| 72 |
+
title="Skin Disease Classifier",
|
| 73 |
+
description="Upload an image, and the model will predict the skin disease (14 categories)."
|
| 74 |
)
|
| 75 |
|
| 76 |
iface.launch()
|