Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -23,10 +23,10 @@ def predict_input_image(img):
|
|
23 |
predictions = my_model.predict(img)
|
24 |
|
25 |
# Convert predictions to binary (0 or 1) based on the threshold
|
26 |
-
|
27 |
|
28 |
# Return the binary prediction
|
29 |
-
return
|
30 |
|
31 |
# Define Gradio interface
|
32 |
iface = gr.Interface(
|
|
|
23 |
predictions = my_model.predict(img)
|
24 |
|
25 |
# Convert predictions to binary (0 or 1) based on the threshold
|
26 |
+
binary_prediction = 'Tumor Detected' if predictions[0][0] > threshold else 'No Tumor Detected'
|
27 |
|
28 |
# Return the binary prediction
|
29 |
+
return binary_prediction
|
30 |
|
31 |
# Define Gradio interface
|
32 |
iface = gr.Interface(
|