FrancescoLR commited on
Commit
04a2241
·
verified ·
1 Parent(s): b07f6e5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -85,7 +85,7 @@ def preprocess_mri(nifti_path):
85
 
86
  # 🔹 Run Brain Age Prediction (Decorated for GPU Execution)
87
  @spaces.GPU(duration=90)
88
- def predict_brain_age(nifti_file): #, actual_age):
89
  return f"Brain Age estimate: 42"
90
 
91
  """
@@ -142,9 +142,9 @@ with gr.Blocks() as demo:
142
 
143
  with gr.Row():
144
  with gr.Column(scale=1):
145
- mri_input = gr.File(label="Upload a T1w MRI (NIfTI .nii.gz)")
146
- #age_input = gr.Number(label="Enter Age", value=50)
147
- sex_input = gr.Radio(["Male", "Female"], label="Select Sex")
148
  submit_button = gr.Button("Predict")
149
 
150
  with gr.Column(scale=2):
@@ -155,7 +155,7 @@ with gr.Blocks() as demo:
155
 
156
  submit_button.click(
157
  fn=predict_brain_age,
158
- inputs=[mri_input], # age_input, sex_input
159
  outputs=[brain_age_output, bad_output]
160
  )
161
 
 
85
 
86
  # 🔹 Run Brain Age Prediction (Decorated for GPU Execution)
87
  @spaces.GPU(duration=90)
88
+ def predict_brain_age(age): #, actual_age):
89
  return f"Brain Age estimate: 42"
90
 
91
  """
 
142
 
143
  with gr.Row():
144
  with gr.Column(scale=1):
145
+ #mri_input = gr.File(label="Upload a T1w MRI (NIfTI .nii.gz)")
146
+ age_input = gr.Number(label="Enter Age", value=50)
147
+ #sex_input = gr.Radio(["Male", "Female"], label="Select Sex")
148
  submit_button = gr.Button("Predict")
149
 
150
  with gr.Column(scale=2):
 
155
 
156
  submit_button.click(
157
  fn=predict_brain_age,
158
+ inputs=[age_input], # mri_input, sex_input
159
  outputs=[brain_age_output, bad_output]
160
  )
161