Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -31,18 +31,19 @@ def process_image(input_image):
|
|
| 31 |
|
| 32 |
iface = gr.Interface(
|
| 33 |
fn=process_image,
|
| 34 |
-
inputs=gr.components.Image(type='pil', label="Input Image"),
|
| 35 |
-
outputs=[gr.components.Image(type='pil', label="Processed Image"), gr.components.Textbox(label="Detected Cancer Type")],
|
| 36 |
live=True,
|
| 37 |
-
title="Lung Cancer Detection
|
| 38 |
-
description="
|
| 39 |
"1. Adenocarcinoma (A)\n"
|
| 40 |
"2. Small Cell Carcinoma (B)\n"
|
| 41 |
"3. Large Cell Carcinoma (E)\n"
|
| 42 |
"4. Squamous Cell Carcinoma (G)\n\n"
|
| 43 |
"How to Use:\n"
|
| 44 |
"1. Upload a CT scan image of a patient's lungs.\n"
|
| 45 |
-
"2. The app will display the predicted type of lung cancer."
|
|
|
|
| 46 |
)
|
| 47 |
|
| 48 |
if __name__ == '__main__':
|
|
|
|
| 31 |
|
| 32 |
iface = gr.Interface(
|
| 33 |
fn=process_image,
|
| 34 |
+
inputs=gr.components.Image(type='pil', label="Input Image").style(height=280),
|
| 35 |
+
outputs=[gr.components.Image(type='pil', label="Processed Image").style(height=280), gr.components.Textbox(label="Detected Cancer Type")],
|
| 36 |
live=True,
|
| 37 |
+
title="Lung Cancer Detection",
|
| 38 |
+
description="The AI model was trained to detect the following types of lung cancer:\n"
|
| 39 |
"1. Adenocarcinoma (A)\n"
|
| 40 |
"2. Small Cell Carcinoma (B)\n"
|
| 41 |
"3. Large Cell Carcinoma (E)\n"
|
| 42 |
"4. Squamous Cell Carcinoma (G)\n\n"
|
| 43 |
"How to Use:\n"
|
| 44 |
"1. Upload a CT scan image of a patient's lungs.\n"
|
| 45 |
+
"2. The app will display the predicted type of lung cancer.",
|
| 46 |
+
theme=gr.themes.Monochrome()
|
| 47 |
)
|
| 48 |
|
| 49 |
if __name__ == '__main__':
|