Spaces:
Sleeping
Sleeping
Commit
·
5c276ab
1
Parent(s):
b8d480c
update app.py 2023-08-31 08:34
Browse files
app.py
CHANGED
|
@@ -54,8 +54,8 @@ def predict(img) -> Tuple[Dict, float]:
|
|
| 54 |
pred_probs = torch.softmax(densenet(img), dim=1).squeeze()
|
| 55 |
|
| 56 |
pred_labels_and_probs = {
|
| 57 |
-
'
|
| 58 |
-
'
|
| 59 |
}
|
| 60 |
|
| 61 |
# Calculate the prediction time
|
|
@@ -68,8 +68,8 @@ example_list = [[f"examples/example{i+1}.jpg"] for i in range(3)]
|
|
| 68 |
|
| 69 |
title = "ChestXray Classification"
|
| 70 |
description = "A Densenet121 computer vision model to classify images of Xray Chest images as Normal or Nodules."
|
| 71 |
-
article = "
|
| 72 |
-
|
| 73 |
demo = gr.Interface(
|
| 74 |
fn=predict,
|
| 75 |
inputs=gr.Image(type="pil"),
|
|
|
|
| 54 |
pred_probs = torch.softmax(densenet(img), dim=1).squeeze()
|
| 55 |
|
| 56 |
pred_labels_and_probs = {
|
| 57 |
+
'Nodules': pred_probs[0].item(),
|
| 58 |
+
'Normal': pred_probs[1].item()
|
| 59 |
}
|
| 60 |
|
| 61 |
# Calculate the prediction time
|
|
|
|
| 68 |
|
| 69 |
title = "ChestXray Classification"
|
| 70 |
description = "A Densenet121 computer vision model to classify images of Xray Chest images as Normal or Nodules."
|
| 71 |
+
article = "model train by hamsteryang0"
|
| 72 |
+
# article = "Created at (https://github.com/azizche/chest_xray_Classification)."
|
| 73 |
demo = gr.Interface(
|
| 74 |
fn=predict,
|
| 75 |
inputs=gr.Image(type="pil"),
|