alibidaran commited on
Commit
08893df
·
verified ·
1 Parent(s): 0a4e702

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -223,7 +223,7 @@ def convert_mask_to_rgb(pred_mask):
223
  return rgb_mask
224
 
225
 
226
- def segment_image(filepath):
227
  image=cv2.imread(filepath)
228
  image=cv2.cvtColor(image,cv2.COLOR_BGR2RGB)
229
  image = cv2.resize(image, (224,224))
@@ -246,7 +246,9 @@ def segment_image(filepath):
246
  return Image.fromarray(masked_image),surg
247
 
248
 
249
- demo=gr.Interface(fn=segment_image,inputs=gr.Image(type='filepath'),
 
 
250
  outputs=[gr.Image(type="pil"),gr.Text()],
251
  examples=["R001_ch1_video_03_00-29-13-03.jpg",
252
  "R002_ch1_video_01_01-07-25-19.jpg",
 
223
  return rgb_mask
224
 
225
 
226
+ def segment_image(filepath,tag):
227
  image=cv2.imread(filepath)
228
  image=cv2.cvtColor(image,cv2.COLOR_BGR2RGB)
229
  image = cv2.resize(image, (224,224))
 
246
  return Image.fromarray(masked_image),surg
247
 
248
 
249
+ demo=gr.Interface(fn=segment_image,inputs=[gr.Image(type='filepath'),gr.HTML("""
250
+ <a href="https://www.buymeacoffee.com/alibidaran96"><img src="https://img.buymeacoffee.com/button-api/?text=Buy me a coffee&emoji=☕&slug=alibidaran96&button_colour=4c2424&font_colour=ffffff&font_family=Poppins&outline_colour=ffffff&coffee_colour=FFDD00" /></a>
251
+ """)
252
  outputs=[gr.Image(type="pil"),gr.Text()],
253
  examples=["R001_ch1_video_03_00-29-13-03.jpg",
254
  "R002_ch1_video_01_01-07-25-19.jpg",