Alessio Grancini
commited on
Update app.py
Browse files
app.py
CHANGED
|
@@ -343,7 +343,15 @@ if __name__ == "__main__":
|
|
| 343 |
model_type_vid.change(model_selector, model_type_vid, [])
|
| 344 |
cancel_btn.click(cancel, inputs=[], outputs=[])
|
| 345 |
options_checkbox_vid.change(update_segmentation_options, options_checkbox_vid, [])
|
| 346 |
-
conf_thres_vid.change(update_confidence_threshold, conf_thres_vid, [])
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 347 |
|
| 348 |
|
| 349 |
my_app.queue(max_size=20).launch()
|
|
|
|
| 343 |
model_type_vid.change(model_selector, model_type_vid, [])
|
| 344 |
cancel_btn.click(cancel, inputs=[], outputs=[])
|
| 345 |
options_checkbox_vid.change(update_segmentation_options, options_checkbox_vid, [])
|
| 346 |
+
conf_thres_vid.change(update_confidence_threshold, conf_thres_vid, [])
|
| 347 |
+
|
| 348 |
+
# Add the new detection data endpoint
|
| 349 |
+
my_app.add_api_route(
|
| 350 |
+
"/get_detection_data",
|
| 351 |
+
get_detection_data,
|
| 352 |
+
methods=["POST"],
|
| 353 |
+
description="Get structured detection data with camera parameters"
|
| 354 |
+
)
|
| 355 |
|
| 356 |
|
| 357 |
my_app.queue(max_size=20).launch()
|