Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -59,14 +59,14 @@ def plot_3d_lungs(lungs_volume, threshold=0.5):
|
|
| 59 |
# --- Gradio Interface ---
|
| 60 |
|
| 61 |
def process_and_visualize(selected_folder):
|
| 62 |
-
if selected_folder not in ["tumor", "lung"]:
|
| 63 |
return "Invalid folder selection." # Handle invalid input
|
| 64 |
|
| 65 |
volume = segment_lungs_from_dicom(selected_folder)
|
| 66 |
visualization = plot_3d_lungs(volume)
|
| 67 |
return visualization
|
| 68 |
|
| 69 |
-
inputs = gr.Dropdown(choices=["tumor", "lung"], label="Select DICOM Folder")
|
| 70 |
output = gr.Plot(label="3D Segmented Lungs")
|
| 71 |
|
| 72 |
iface = gr.Interface(
|
|
|
|
| 59 |
# --- Gradio Interface ---
|
| 60 |
|
| 61 |
def process_and_visualize(selected_folder):
|
| 62 |
+
if selected_folder not in ["tumor", "lung", "tumor2"]:
|
| 63 |
return "Invalid folder selection." # Handle invalid input
|
| 64 |
|
| 65 |
volume = segment_lungs_from_dicom(selected_folder)
|
| 66 |
visualization = plot_3d_lungs(volume)
|
| 67 |
return visualization
|
| 68 |
|
| 69 |
+
inputs = gr.Dropdown(choices=["tumor", "lung", "tumor2"], label="Select DICOM Folder")
|
| 70 |
output = gr.Plot(label="3D Segmented Lungs")
|
| 71 |
|
| 72 |
iface = gr.Interface(
|