saritha5 commited on
Commit
c001cf0
·
1 Parent(s): eaae869

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -101,7 +101,7 @@ def prediction(image_path):
101
  ax[1].imshow(image_np,aspect='auto');
102
 
103
 
104
- return objects,image_np
105
 
106
 
107
 
@@ -129,7 +129,7 @@ def prediction(image_path):
129
  response = {"predictions": [result]}
130
  total_time_end = time.time()
131
  print("total time : ",round((total_time_end-total_time_start),2))
132
- return simplejson.dumps(response),image_np
133
 
134
  inputs = gr.inputs.Image(type = 'filepath')
135
  EXAMPLES = ["img1.jpg","img2.jpg","img6.jpg","img7.jpg","img8.jpg","img4.jpg","img10.jpg"]
 
101
  ax[1].imshow(image_np,aspect='auto');
102
 
103
 
104
+ return objects,ax[1]
105
 
106
 
107
 
 
129
  response = {"predictions": [result]}
130
  total_time_end = time.time()
131
  print("total time : ",round((total_time_end-total_time_start),2))
132
+ return simplejson.dumps(response),fig
133
 
134
  inputs = gr.inputs.Image(type = 'filepath')
135
  EXAMPLES = ["img1.jpg","img2.jpg","img6.jpg","img7.jpg","img8.jpg","img4.jpg","img10.jpg"]