Hamam commited on
Commit
861a11c
·
verified ·
1 Parent(s): 9b168e8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -3
app.py CHANGED
@@ -15,7 +15,7 @@ def load_model(model, model_path, device):
15
  return model
16
 
17
  # Load the model onto the specified device
18
- u2net = load_model(model=u2net, model_path="/content/u2net.pth", device="cpu")
19
 
20
  # Mean and std for normalization
21
  mean = torch.tensor([0.485, 0.456, 0.406])
@@ -103,8 +103,7 @@ iface = gr.Interface(
103
  fn=segment_image,
104
  inputs=gr.Image(type="numpy"),
105
  outputs=gr.Image(type="pil",format="png"),
106
- title="Image Segmentation with U2NET",
107
- description="Upload an image to segment it using the U2NET model. The background of the segmented output will be transparent."
108
  )
109
 
110
  # Launch the interface
 
15
  return model
16
 
17
  # Load the model onto the specified device
18
+ u2net = load_model(model=u2net, model_path="u2net.pth", device="cpu")
19
 
20
  # Mean and std for normalization
21
  mean = torch.tensor([0.485, 0.456, 0.406])
 
103
  fn=segment_image,
104
  inputs=gr.Image(type="numpy"),
105
  outputs=gr.Image(type="pil",format="png"),
106
+ title="Remove Background From Image"
 
107
  )
108
 
109
  # Launch the interface