Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -42,7 +42,7 @@ configs = {
|
|
| 42 |
"MEAN": (0.485, 0.456, 0.406),
|
| 43 |
"STD": (0.229, 0.224, 0.225),
|
| 44 |
|
| 45 |
-
"DEFAULT_BACKBONE": "
|
| 46 |
"THRESHOLD": 0.5
|
| 47 |
}
|
| 48 |
|
|
@@ -289,7 +289,7 @@ example_list_img_names = os.listdir(example_list_dir)
|
|
| 289 |
|
| 290 |
example_list = [
|
| 291 |
[configs["DEFAULT_BACKBONE"], os.path.join(example_list_dir, example_img)]
|
| 292 |
-
for example_img in example_list_img_names[:
|
| 293 |
if example_img.lower().endswith(".png")]
|
| 294 |
|
| 295 |
# example_list = [['/content/new_labels.csv',"ResNet50"]]
|
|
@@ -299,7 +299,7 @@ gradio_app = gradio.Interface(
|
|
| 299 |
|
| 300 |
inputs = [gradio.Dropdown(list(BACKBONE_REGISTRY.keys()), value="ResNet50", label="Select Backbone Model"),
|
| 301 |
gradio.Image(type="pil", label="Load chest-X-ray image here"),
|
| 302 |
-
gradio.Slider(minimum = 0.1, maximum = 0.9, step = 0.
|
| 303 |
],
|
| 304 |
|
| 305 |
outputs = [gradio.Textbox(label="Predicted Medical Conditions"),
|
|
|
|
| 42 |
"MEAN": (0.485, 0.456, 0.406),
|
| 43 |
"STD": (0.229, 0.224, 0.225),
|
| 44 |
|
| 45 |
+
"DEFAULT_BACKBONE": "ConvNeXt(tiny)",
|
| 46 |
"THRESHOLD": 0.5
|
| 47 |
}
|
| 48 |
|
|
|
|
| 289 |
|
| 290 |
example_list = [
|
| 291 |
[configs["DEFAULT_BACKBONE"], os.path.join(example_list_dir, example_img)]
|
| 292 |
+
for example_img in example_list_img_names[:8]
|
| 293 |
if example_img.lower().endswith(".png")]
|
| 294 |
|
| 295 |
# example_list = [['/content/new_labels.csv',"ResNet50"]]
|
|
|
|
| 299 |
|
| 300 |
inputs = [gradio.Dropdown(list(BACKBONE_REGISTRY.keys()), value="ResNet50", label="Select Backbone Model"),
|
| 301 |
gradio.Image(type="pil", label="Load chest-X-ray image here"),
|
| 302 |
+
gradio.Slider(minimum = 0.1, maximum = 0.9, step = 0.05, value = 0.4, label = "Set Prediction Threshold")
|
| 303 |
],
|
| 304 |
|
| 305 |
outputs = [gradio.Textbox(label="Predicted Medical Conditions"),
|