aje6 commited on
Commit
6fcee56
·
verified ·
1 Parent(s): 7e09b1e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -233,13 +233,15 @@ def predict(image):
233
  output = model(img_tensor)
234
 
235
  # Process output (adjust based on your model's format)
236
- return output # or post-process the results as needed
 
 
237
 
238
  # Gradio interface
239
  demo = gr.Interface(
240
  fn=predict,
241
  inputs=gr.Image(type="pil"), # Accepts image input
242
- outputs="json" # Customize based on your output format
243
  )
244
 
245
  if __name__ == "__main__":
 
233
  output = model(img_tensor)
234
 
235
  # Process output (adjust based on your model's format)
236
+ # return output # or post-process the results as needed
237
+ annotated_img = output.render()[0]
238
+ return annotated_img
239
 
240
  # Gradio interface
241
  demo = gr.Interface(
242
  fn=predict,
243
  inputs=gr.Image(type="pil"), # Accepts image input
244
+ outputs="image" # Customize based on your output format
245
  )
246
 
247
  if __name__ == "__main__":