Spaces:
Sleeping
Sleeping
updated app.py
Browse files
app.py
CHANGED
|
@@ -40,7 +40,7 @@ def predict(Image):
|
|
| 40 |
|
| 41 |
with torch.no_grad():
|
| 42 |
grade = torch.softmax(model(img.float()), dim=1)[0]
|
| 43 |
-
category = ["
|
| 44 |
output_dict = {}
|
| 45 |
for cat, value in zip(category, grade):
|
| 46 |
output_dict[cat] = value.item()
|
|
@@ -50,7 +50,7 @@ def predict(Image):
|
|
| 50 |
|
| 51 |
|
| 52 |
image = gr.Image(type="pil")#shape=(224, 224), image_mode="RGB")
|
| 53 |
-
label = gr.Label(label="
|
| 54 |
|
| 55 |
demo = gr.Interface(
|
| 56 |
fn=predict,
|
|
|
|
| 40 |
|
| 41 |
with torch.no_grad():
|
| 42 |
grade = torch.softmax(model(img.float()), dim=1)[0]
|
| 43 |
+
category = ["Normal", "Mild", "Moderate", "Severe", "Proliferative"]
|
| 44 |
output_dict = {}
|
| 45 |
for cat, value in zip(category, grade):
|
| 46 |
output_dict[cat] = value.item()
|
|
|
|
| 50 |
|
| 51 |
|
| 52 |
image = gr.Image(type="pil")#shape=(224, 224), image_mode="RGB")
|
| 53 |
+
label = gr.Label(label="Level")
|
| 54 |
|
| 55 |
demo = gr.Interface(
|
| 56 |
fn=predict,
|