sayedM commited on
Commit
bf7469c
·
1 Parent(s): 35eddcc

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +13 -3
app.py CHANGED
@@ -64,6 +64,13 @@ examples = [
64
  ["tu2.jpg", 0.25, 0.45],
65
  ["tu3.jpg", 0.25, 0.45],
66
  ]
 
 
 
 
 
 
 
67
  # demo_app = gr.Interface(examples=examples,
68
  # fn=yolov8_inference,
69
  # inputs=inputs,
@@ -95,13 +102,16 @@ with gr.Blocks() as demo:
95
  with gr.Row():
96
  IOU_Slider=gr.Slider(minimum=0.0, maximum=1.0, value=0.45, step=0.05, label="IOU Threshold")
97
 
98
- gr.Examples(examples) # Add the examples to
99
 
100
- with gr.Row():
101
- button = gr.Button("Run")
 
102
 
103
  # Define the event listener that connects the input and output components and triggers the function
104
  button.click(fn=get_results, inputs=[image_input, conf_slider,IOU_Slider], outputs=output, api_name="yolov8_inference")
 
 
105
  # Add the description below the layout
106
  gr.Markdown(description_html)
107
  # Launch the app
 
64
  ["tu2.jpg", 0.25, 0.45],
65
  ["tu3.jpg", 0.25, 0.45],
66
  ]
67
+
68
+ outputs = [
69
+ ["1.jpg"], # First example: an output image for the cat example
70
+ ["2.jpg"] # Second example: an output image for the dog example
71
+ ,["3.jpg"]
72
+ ]
73
+
74
  # demo_app = gr.Interface(examples=examples,
75
  # fn=yolov8_inference,
76
  # inputs=inputs,
 
102
  with gr.Row():
103
  IOU_Slider=gr.Slider(minimum=0.0, maximum=1.0, value=0.45, step=0.05, label="IOU Threshold")
104
 
105
+
106
 
107
+
108
+ button = gr.Button("Run")
109
+
110
 
111
  # Define the event listener that connects the input and output components and triggers the function
112
  button.click(fn=get_results, inputs=[image_input, conf_slider,IOU_Slider], outputs=output, api_name="yolov8_inference")
113
+
114
+ gr.Examples(inputs=inputs, outputs=outputs)
115
  # Add the description below the layout
116
  gr.Markdown(description_html)
117
  # Launch the app