rishabh5752 commited on
Commit
17ca5e5
·
1 Parent(s): 2cea944

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +19 -13
app.py CHANGED
@@ -24,17 +24,23 @@ def predict(image):
24
 
25
  examples = [["benign.jpg"], ["malignant.jpg"]]
26
 
27
- # Define a Gradio interface for user interaction
28
- image_input = gr.inputs.Image(shape=(150, 150))
29
- label_output = gr.outputs.Label()
 
 
 
 
 
 
 
 
 
 
 
30
 
31
- iface = gr.Interface(
32
- fn=predict,
33
- inputs=image_input,
34
- outputs=label_output,
35
- examples=examples,
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()