Elena
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -29,7 +29,7 @@ css = """
|
|
29 |
font-size: 16px;
|
30 |
}
|
31 |
.gr-button:hover {
|
32 |
-
background-color: #
|
33 |
}
|
34 |
.gr-textbox, .gr-image {
|
35 |
border: 2px dashed #007bff;
|
@@ -54,7 +54,20 @@ css = """
|
|
54 |
text-align: center;
|
55 |
}
|
56 |
"""
|
|
|
|
|
|
|
|
|
57 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
58 |
|
59 |
examples = [
|
60 |
["samples/normal_xray1.png"],
|
@@ -63,14 +76,14 @@ examples = [
|
|
63 |
|
64 |
# Gradio interface set up instructions
|
65 |
with gr.Blocks(css=css) as interface:
|
66 |
-
gr.Markdown("<h1>Chest X-ray
|
67 |
-
gr.Markdown("<p>Upload an X-ray image to
|
68 |
|
69 |
with gr.Row():
|
70 |
image_input = gr.Image(label="Drop Image Here", type="pil", elem_classes=["gr-image", "gr-box-text"])
|
71 |
output = gr.Textbox(label="Model Analysis Output", elem_classes=["gr-textbox", "gr-box-text"])
|
72 |
|
73 |
-
submit_btn = gr.Button("
|
74 |
submit_btn.click(fn=predict, inputs=image_input, outputs=output)
|
75 |
|
76 |
|
|
|
29 |
font-size: 16px;
|
30 |
}
|
31 |
.gr-button:hover {
|
32 |
+
background-color: #007bff;
|
33 |
}
|
34 |
.gr-textbox, .gr-image {
|
35 |
border: 2px dashed #007bff;
|
|
|
54 |
text-align: center;
|
55 |
}
|
56 |
"""
|
57 |
+
description = """
|
58 |
+
**Automated Pneumonia Detection via Chest X-ray Classification**
|
59 |
+
|
60 |
+
This model leverages deep learning techniques to classify chest X-ray images as either 'Pneumonia' or 'Normal.' By utilizing the InceptionV3 architecture for transfer learning, combined with data preprocessing and augmentation, the model aims to deliver powerful performance in medical image analysis. It enhances the automation of diagnostic processes, aiding in the detection of pneumonia with high accuracy.
|
61 |
|
62 |
+
**Technologies Employed:**
|
63 |
+
- TensorFlow & Keras for model development
|
64 |
+
- InceptionV3 for transfer learning
|
65 |
+
- Numpy, Pandas, and Matplotlib for data handling and visualization
|
66 |
+
- Flask and Gradio for deployment and user interaction
|
67 |
+
|
68 |
+
**Sample Images:**
|
69 |
+
To test the model, select one of the sample images provided below. Click on an image and then press the "Execute Classification" button to receive the results.
|
70 |
+
"""
|
71 |
|
72 |
examples = [
|
73 |
["samples/normal_xray1.png"],
|
|
|
76 |
|
77 |
# Gradio interface set up instructions
|
78 |
with gr.Blocks(css=css) as interface:
|
79 |
+
gr.Markdown("<h1>Automated Pneumonia Detection via Chest X-ray Classification</h1>")
|
80 |
+
gr.Markdown("<p>Upload an X-ray image to detect pneumonia.</p>")
|
81 |
|
82 |
with gr.Row():
|
83 |
image_input = gr.Image(label="Drop Image Here", type="pil", elem_classes=["gr-image", "gr-box-text"])
|
84 |
output = gr.Textbox(label="Model Analysis Output", elem_classes=["gr-textbox", "gr-box-text"])
|
85 |
|
86 |
+
submit_btn = gr.Button("Initiate Diagnostic Analysis", elem_classes=["gr-button"])
|
87 |
submit_btn.click(fn=predict, inputs=image_input, outputs=output)
|
88 |
|
89 |
|