Alessio Grancini
commited on
Update app.py
Browse files
app.py
CHANGED
|
@@ -331,13 +331,12 @@ if __name__ == "__main__":
|
|
| 331 |
|
| 332 |
# Add a new hidden tab or interface for the API endpoint
|
| 333 |
with gr.Tab("API", visible=False): # Hidden from UI but accessible via API
|
| 334 |
-
|
| 335 |
-
|
| 336 |
gr.Interface(
|
| 337 |
fn=get_detection_data,
|
| 338 |
-
inputs=
|
| 339 |
-
outputs=
|
| 340 |
-
title="Get Detection Data",
|
| 341 |
api_name="get_detection_data" # This sets the endpoint name
|
| 342 |
)
|
| 343 |
|
|
|
|
| 331 |
|
| 332 |
# Add a new hidden tab or interface for the API endpoint
|
| 333 |
with gr.Tab("API", visible=False): # Hidden from UI but accessible via API
|
| 334 |
+
api_input = gr.JSON()
|
| 335 |
+
api_output = gr.JSON()
|
| 336 |
gr.Interface(
|
| 337 |
fn=get_detection_data,
|
| 338 |
+
inputs=api_input,
|
| 339 |
+
outputs=api_output,
|
|
|
|
| 340 |
api_name="get_detection_data" # This sets the endpoint name
|
| 341 |
)
|
| 342 |
|