Alessio Grancini
commited on
Update app.py
Browse files
app.py
CHANGED
|
@@ -357,18 +357,4 @@ if __name__ == "__main__":
|
|
| 357 |
options_checkbox_vid.change(update_segmentation_options, options_checkbox_vid, [])
|
| 358 |
conf_thres_vid.change(update_confidence_threshold, conf_thres_vid, [])
|
| 359 |
|
| 360 |
-
|
| 361 |
-
# Add a new hidden tab or interface for the API endpoint
|
| 362 |
-
with gr.Tab("API", visible=False): # Hidden from UI but accessible via API
|
| 363 |
-
input_image = gr.Image()
|
| 364 |
-
output_json = gr.JSON()
|
| 365 |
-
gr.Interface(
|
| 366 |
-
fn=get_detection_data,
|
| 367 |
-
inputs=input_image,
|
| 368 |
-
outputs=output_json,
|
| 369 |
-
title="Get Detection Data",
|
| 370 |
-
api_name="get_detection_data" # This sets the endpoint name
|
| 371 |
-
)
|
| 372 |
-
|
| 373 |
-
|
| 374 |
my_app.queue(max_size=20).launch()
|
|
|
|
| 357 |
options_checkbox_vid.change(update_segmentation_options, options_checkbox_vid, [])
|
| 358 |
conf_thres_vid.change(update_confidence_threshold, conf_thres_vid, [])
|
| 359 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 360 |
my_app.queue(max_size=20).launch()
|