Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -12,22 +12,9 @@ with gr.Blocks() as demo:
|
|
| 12 |
gr.Markdown("# Lung Cancer Classifier")
|
| 13 |
with gr.Row():
|
| 14 |
with gr.Column():
|
| 15 |
-
input_image = gr.Image(label="Input Image", type="pil")
|
| 16 |
submit_btn = gr.Button("Detect Cancer")
|
| 17 |
with gr.Column():
|
| 18 |
output_text = gr.Textbox(label="Model Results")
|
| 19 |
|
| 20 |
-
gr.Markdown("## Image Examples")
|
| 21 |
-
gr.Examples(
|
| 22 |
-
examples=[os.path.join(os.path.dirname(__file__), "lung01.jpeg"),
|
| 23 |
-
os.path.join(os.path.dirname(__file__), "lung02.jpeg"),
|
| 24 |
-
os.path.join(os.path.dirname(__file__), "lung03.jpeg")
|
| 25 |
-
],
|
| 26 |
-
inputs=input_image,
|
| 27 |
-
outputs=output_text,
|
| 28 |
-
fn=image_classifier,
|
| 29 |
-
cache_examples=True,
|
| 30 |
-
)
|
| 31 |
-
|
| 32 |
-
|
| 33 |
demo.launch()
|
|
|
|
| 12 |
gr.Markdown("# Lung Cancer Classifier")
|
| 13 |
with gr.Row():
|
| 14 |
with gr.Column():
|
| 15 |
+
input_image = gr.Image(shape=(224,224), label="Input Image", type="pil")
|
| 16 |
submit_btn = gr.Button("Detect Cancer")
|
| 17 |
with gr.Column():
|
| 18 |
output_text = gr.Textbox(label="Model Results")
|
| 19 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 20 |
demo.launch()
|