Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -46,13 +46,13 @@ def predict(image):
|
|
| 46 |
preprocessed_image = preprocess(image)
|
| 47 |
prediction = model.predict(tf.expand_dims(preprocessed_image, axis=0))[0][0]
|
| 48 |
if prediction >= 0.5:
|
| 49 |
-
return '
|
| 50 |
else:
|
| 51 |
-
return '
|
| 52 |
|
| 53 |
# Interface Gradio
|
| 54 |
inputs = gr.inputs.Image()
|
| 55 |
outputs = gr.outputs.Textbox()
|
| 56 |
|
| 57 |
-
app = gr.Interface(fn=predict, inputs=inputs, outputs=outputs, title='
|
| 58 |
app.launch()
|
|
|
|
| 46 |
preprocessed_image = preprocess(image)
|
| 47 |
prediction = model.predict(tf.expand_dims(preprocessed_image, axis=0))[0][0]
|
| 48 |
if prediction >= 0.5:
|
| 49 |
+
return 'noncancer'
|
| 50 |
else:
|
| 51 |
+
return 'cancer'
|
| 52 |
|
| 53 |
# Interface Gradio
|
| 54 |
inputs = gr.inputs.Image()
|
| 55 |
outputs = gr.outputs.Textbox()
|
| 56 |
|
| 57 |
+
app = gr.Interface(fn=predict, inputs=inputs, outputs=outputs, title='Breast-Histopathology-Classifier')
|
| 58 |
app.launch()
|