Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -94,13 +94,9 @@ feature_inputs = [gr.Number(label=feature) for feature in feature_names]
|
|
94 |
def fill_example(example):
|
95 |
return {feature_inputs[i]: example[i] for i in range(len(feature_inputs))}
|
96 |
|
97 |
-
example_buttons = gr.Radio(["Benign Example", "Malignant Example"], label="Select Example Input")
|
98 |
-
def update_example(choice):
|
99 |
-
return fill_example(benign_example if choice == "Benign Example" else malignant_example)
|
100 |
-
|
101 |
iface = gr.Interface(
|
102 |
fn=classify,
|
103 |
-
inputs=[model_selector, image_input
|
104 |
outputs="text",
|
105 |
title="Breast Cancer Classification",
|
106 |
description="Choose between ViT (image-based) and Neural Network (feature-based) classification.",
|
|
|
94 |
def fill_example(example):
|
95 |
return {feature_inputs[i]: example[i] for i in range(len(feature_inputs))}
|
96 |
|
|
|
|
|
|
|
|
|
97 |
iface = gr.Interface(
|
98 |
fn=classify,
|
99 |
+
inputs=[model_selector, image_input] + feature_inputs,
|
100 |
outputs="text",
|
101 |
title="Breast Cancer Classification",
|
102 |
description="Choose between ViT (image-based) and Neural Network (feature-based) classification.",
|