chuuhtetnaing commited on
Commit
1cbf784
·
1 Parent(s): af63c6b

changed to jpeg format

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -45,7 +45,7 @@ def process(image):
45
  return combined
46
 
47
  def process_file(f):
48
- name_path = f.rsplit(".",1)[0]+".png"
49
  im = load_img(f, output_type="pil")
50
  im = im.convert("RGB")
51
  transparent = process(im)
@@ -57,7 +57,7 @@ slider2 = ImageSlider(label="birefnet", type="pil")
57
  image = gr.Image(label="Upload an image")
58
  image2 = gr.Image(label="Upload an image",type="filepath")
59
  text = gr.Textbox(label="Paste an image URL")
60
- png_file = gr.File(label="output png file")
61
 
62
 
63
  chameleon = load_img("butterfly.jpg", output_type="pil")
@@ -68,7 +68,7 @@ tab3 = gr.Interface(process_file, inputs=image2, outputs=png_file, examples=["bu
68
 
69
 
70
  demo = gr.TabbedInterface(
71
- [tab3], ["png"], title="Na Na"
72
  )
73
 
74
  if __name__ == "__main__":
 
45
  return combined
46
 
47
  def process_file(f):
48
+ name_path = f.rsplit(".",1)[0]+".jpeg"
49
  im = load_img(f, output_type="pil")
50
  im = im.convert("RGB")
51
  transparent = process(im)
 
57
  image = gr.Image(label="Upload an image")
58
  image2 = gr.Image(label="Upload an image",type="filepath")
59
  text = gr.Textbox(label="Paste an image URL")
60
+ png_file = gr.File(label="output jpeg file")
61
 
62
 
63
  chameleon = load_img("butterfly.jpg", output_type="pil")
 
68
 
69
 
70
  demo = gr.TabbedInterface(
71
+ [tab3], ["jpeg"], title="Na Na"
72
  )
73
 
74
  if __name__ == "__main__":