Alessio Grancini commited on
Commit
dcdf01a
·
verified ·
1 Parent(s): da9e022

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -5
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
- input_image = gr.Image()
335
- output_json = gr.JSON()
336
  gr.Interface(
337
  fn=get_detection_data,
338
- inputs=input_image,
339
- outputs=output_json,
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