testmail-gmail commited on
Commit
823695e
·
1 Parent(s): 5a9b7cc

Returning two images

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -151,7 +151,7 @@ def detect_Custom(img,model,boundedImage):
151
 
152
  print(f'Done. ({time.time() - t0:.3f}s)')
153
 
154
- return Image.fromarray(im0[:,:,::-1])
155
 
156
 
157
 
@@ -172,4 +172,4 @@ examples1=[["Image1.jpeg", "Yolo_v7_Custom_trained_By_Owais"],["Image2.jpeg", "Y
172
  Top_Title="<center>Intelligent Image to Text - IIT </center></a>"
173
 
174
  css = ".output-image, .input-image, .image-preview {height: 300px !important}"
175
- gr.Interface(detect_Custom,[gr.Image(type="pil"),gr.Dropdown(default="Yolo_v7_Custom_trained_By_Owais",choices=["Yolo_v7_Custom_trained_By_Owais","yolov7","yolov7-e6"]),gr.Image(type="pil")],gr.Image(type="pil"),css=css,title=Top_Title,examples=examples1,description=Custom_description,article=Footer,cache_examples=False).launch()
 
151
 
152
  print(f'Done. ({time.time() - t0:.3f}s)')
153
 
154
+ return Image.fromarray(im0[:,:,::-1]), boundedImage
155
 
156
 
157
 
 
172
  Top_Title="<center>Intelligent Image to Text - IIT </center></a>"
173
 
174
  css = ".output-image, .input-image, .image-preview {height: 300px !important}"
175
+ gr.Interface(detect_Custom,[gr.Image(type="pil"),gr.Dropdown(default="Yolo_v7_Custom_trained_By_Owais",choices=["Yolo_v7_Custom_trained_By_Owais","yolov7","yolov7-e6"]),gr.Image(type="pil")],[gr.Image(type="pil"),gr.Image(type="pil")],css=css,title=Top_Title,examples=examples1,description=Custom_description,article=Footer,cache_examples=False).launch()