Update app.py
Browse files
app.py
CHANGED
@@ -130,10 +130,13 @@ def read_and_preprocess_dicom(file_path: str):
|
|
130 |
|
131 |
return image, df_metadata.to_pandas() # Convert to pandas DataFrame for Gradio compatibility
|
132 |
|
133 |
-
|
134 |
# Define Gradio components
|
135 |
input_component = gr.File(label="Input DICOM Data")
|
136 |
-
output_component = gr.components.Image(type="numpy", label="Output Image")
|
|
|
|
|
|
|
137 |
|
138 |
# Create Gradio interface
|
139 |
interface = gr.Interface(
|
@@ -195,4 +198,4 @@ def build_interface():
|
|
195 |
if __name__ == '__main__':
|
196 |
demo = build_interface()
|
197 |
demo.launch
|
198 |
-
|
|
|
130 |
|
131 |
return image, df_metadata.to_pandas() # Convert to pandas DataFrame for Gradio compatibility
|
132 |
|
133 |
+
|
134 |
# Define Gradio components
|
135 |
input_component = gr.File(label="Input DICOM Data")
|
136 |
+
#output_component = gr.components.Image(type="numpy", label="Output Image")
|
137 |
+
dicom_image = gr.Image(type="numpy", label="Output Image")
|
138 |
+
dicom_meta = gr.Dataframe(headers=None, label="Metadata")
|
139 |
+
output_component = [dicom_image, dicom_meta]
|
140 |
|
141 |
# Create Gradio interface
|
142 |
interface = gr.Interface(
|
|
|
198 |
if __name__ == '__main__':
|
199 |
demo = build_interface()
|
200 |
demo.launch
|
201 |
+
'''
|