isaac commited on
Commit
96d95b8
·
1 Parent(s): 358d38e

Accept .gz suffix for nii.gz uploads

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -118,7 +118,9 @@ def diagnose(ct_file):
118
  demo = gr.Interface(
119
  fn=diagnose,
120
  inputs=gr.File(
121
- label="Abdominal CT (.nii.gz)", file_types=[".nii", ".nii.gz"]
 
 
122
  ),
123
  outputs=[gr.Label(label="Top findings", num_top_classes=10), gr.Dataframe(label="All finding scores")],
124
  title="RADAR Abdominal CT",
 
118
  demo = gr.Interface(
119
  fn=diagnose,
120
  inputs=gr.File(
121
+ # ".gz" not ".nii.gz": Gradio matches Path.suffix ("gz"), so the compound form never validates.
122
+ # diagnose() still enforces .nii/.nii.gz + NIfTI-parseable content server-side.
123
+ label="Abdominal CT (.nii.gz)", file_types=[".nii", ".gz"]
124
  ),
125
  outputs=[gr.Label(label="Top findings", num_top_classes=10), gr.Dataframe(label="All finding scores")],
126
  title="RADAR Abdominal CT",