MankiratSingh1315
commited on
Commit
•
0458996
1
Parent(s):
7537fbd
Update app.py
Browse files
app.py
CHANGED
@@ -56,27 +56,26 @@ def predict(img):
|
|
56 |
|
57 |
return labels_probs, Path("gradcam.jpg")
|
58 |
|
59 |
-
with open('gradio_article.md') as f:
|
60 |
-
|
61 |
|
62 |
-
interface_options = {
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
}
|
70 |
|
71 |
demo = gradio.Interface(fn=predict,
|
72 |
inputs=gradio.inputs.Image(shape=(512, 512), label="Chest X-ray"),
|
73 |
outputs=[gradio.outputs.Label(num_top_classes=5, label="Detected Class"),
|
74 |
-
gradio.outputs.Image(type="filepath", label="GradCAM")]
|
75 |
-
**interface_options)
|
76 |
|
77 |
launch_options = {
|
78 |
"enable_queue": True,
|
79 |
-
"share":
|
80 |
}
|
81 |
|
82 |
demo.launch(**launch_options)
|
|
|
56 |
|
57 |
return labels_probs, Path("gradcam.jpg")
|
58 |
|
59 |
+
# with open('gradio_article.md') as f:
|
60 |
+
# article = f.read()
|
61 |
|
62 |
+
# interface_options = {
|
63 |
+
# "title": "RSNA Pneumonia Detection",
|
64 |
+
# "description": "An algorithm that automatically detects potential pneumonia cases. Upload an image or select from the examples below.",
|
65 |
+
# "examples": [f'{EXAMPLES_PATH}/{f.name}' for f in EXAMPLES_PATH.iterdir()],
|
66 |
+
# "article": article,
|
67 |
+
# "layout": "horizontal",
|
68 |
+
# "theme": "default",
|
69 |
+
# }
|
70 |
|
71 |
demo = gradio.Interface(fn=predict,
|
72 |
inputs=gradio.inputs.Image(shape=(512, 512), label="Chest X-ray"),
|
73 |
outputs=[gradio.outputs.Label(num_top_classes=5, label="Detected Class"),
|
74 |
+
gradio.outputs.Image(type="filepath", label="GradCAM")])
|
|
|
75 |
|
76 |
launch_options = {
|
77 |
"enable_queue": True,
|
78 |
+
"share": True,
|
79 |
}
|
80 |
|
81 |
demo.launch(**launch_options)
|