ajinkyakolhe112 commited on
Commit
98af2c3
·
verified ·
1 Parent(s): ca03e27

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +13 -13
app.py CHANGED
@@ -21,19 +21,19 @@ def predict(inp):
21
 
22
  import gradio as gr
23
 
24
- demo = gr.Blocks(title="Image Classification for 1000 Objects", css=".gradio-container {background:mintcream;}")
25
- gr.HTML("""<div style="font-family:'Times New Roman', 'Serif'; font-size:16pt; font-weight:bold; text-align:center; color:royalblue;">Image Classification for 1000 Objects</div>""")
26
-
27
- with gr.Row():
28
- input_image = gr.Image(type="filepath", image_mode="L")
29
- output_label = gr.Label(label="Probabilities", num_top_classes=3)
30
-
31
- send_btn = gr.Button("Infer")
32
- send_btn.click(fn=predict, inputs=input_image, outputs=output_label)
33
-
34
- with gr.Row():
35
- gr.Examples(['./lion.jpg'] , label='Sample images : Lion', inputs=input_image)
36
- gr.Examples(['./cheetah.jpg'], label='Cheetah' , inputs=input_image)
37
 
38
  # gr.Interface(fn=predict,
39
  # inputs=gr.Image(type="pil"),
 
21
 
22
  import gradio as gr
23
 
24
+ with gr.Blocks(title="Image Classification for 1000 Objects", css=".gradio-container {background:mintcream;}") as demo:
25
+ gr.HTML("""<div style="font-family:'Times New Roman', 'Serif'; font-size:16pt; font-weight:bold; text-align:center; color:royalblue;">Image Classification for 1000 Objects</div>""")
26
+
27
+ with gr.Row():
28
+ input_image = gr.Image(type="filepath", image_mode="L")
29
+ output_label = gr.Label(label="Probabilities", num_top_classes=3)
30
+
31
+ send_btn = gr.Button("Infer")
32
+ send_btn.click(fn=predict, inputs=input_image, outputs=output_label)
33
+
34
+ with gr.Row():
35
+ gr.Examples(['./lion.jpg'] , label='Sample images : Lion', inputs=input_image)
36
+ gr.Examples(['./cheetah.jpg'], label='Cheetah' , inputs=input_image)
37
 
38
  # gr.Interface(fn=predict,
39
  # inputs=gr.Image(type="pil"),