Spaces:
Runtime error
Runtime error
Commit
·
17ca5e5
1
Parent(s):
2cea944
Update app.py
Browse files
app.py
CHANGED
|
@@ -24,17 +24,23 @@ def predict(image):
|
|
| 24 |
|
| 25 |
examples = [["benign.jpg"], ["malignant.jpg"]]
|
| 26 |
|
| 27 |
-
#
|
| 28 |
-
|
| 29 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 30 |
|
| 31 |
-
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
|
| 35 |
-
|
| 36 |
-
title="Skin Cancer Classification",
|
| 37 |
-
description="Predicts whether a skin image is cancerous or not."
|
| 38 |
-
)
|
| 39 |
-
|
| 40 |
-
iface.launch()
|
|
|
|
| 24 |
|
| 25 |
examples = [["benign.jpg"], ["malignant.jpg"]]
|
| 26 |
|
| 27 |
+
# Customized layout and style for improved UI
|
| 28 |
+
interface_layout = [
|
| 29 |
+
gr.Interface(
|
| 30 |
+
fn=predict,
|
| 31 |
+
inputs=gr.inputs.Image(shape=(150, 150)),
|
| 32 |
+
outputs=gr.outputs.Label(),
|
| 33 |
+
examples=examples,
|
| 34 |
+
title="Skin Cancer Classification",
|
| 35 |
+
description="Predicts whether a skin image is cancerous or not.",
|
| 36 |
+
theme="default", # Choose a theme: "default", "compact", "huggingface"
|
| 37 |
+
layout="vertical", # Choose a layout: "vertical", "horizontal", "double"
|
| 38 |
+
live=False # Set to True for live updates without clicking "Submit"
|
| 39 |
+
)
|
| 40 |
+
]
|
| 41 |
|
| 42 |
+
gr.Interface(
|
| 43 |
+
layout="colab", # Choose a layout: "colab", "colab-sandbox", "textbox"
|
| 44 |
+
layout_options={"fullscreen": True},
|
| 45 |
+
interfaces=interface_layout
|
| 46 |
+
).launch()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|