Spaces:
Running on Zero
Running on Zero
Update app.py
Browse files
app.py
CHANGED
|
@@ -84,7 +84,7 @@ def preprocess_mri(nifti_path):
|
|
| 84 |
return next(iter(dataloader))["image"].to(device)
|
| 85 |
|
| 86 |
# 🔹 Run Brain Age Prediction (Decorated for GPU Execution)
|
| 87 |
-
|
| 88 |
def predict_brain_age(nifti_file, actual_age):
|
| 89 |
return f"Brain Age estimate: 42"
|
| 90 |
"""
|
|
@@ -155,7 +155,7 @@ with gr.Blocks() as demo:
|
|
| 155 |
submit_button.click(
|
| 156 |
fn=predict_brain_age,
|
| 157 |
inputs=[mri_input, age_input], #sex_input
|
| 158 |
-
outputs=[brain_age_output, bad_output]
|
| 159 |
)
|
| 160 |
|
| 161 |
gr.Markdown("""
|
|
|
|
| 84 |
return next(iter(dataloader))["image"].to(device)
|
| 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 |
"""
|
|
|
|
| 155 |
submit_button.click(
|
| 156 |
fn=predict_brain_age,
|
| 157 |
inputs=[mri_input, age_input], #sex_input
|
| 158 |
+
#outputs=[brain_age_output, bad_output]
|
| 159 |
)
|
| 160 |
|
| 161 |
gr.Markdown("""
|