hysts HF staff commited on
Commit
9aeb2df
·
1 Parent(s): d0028f2
Files changed (1) hide show
  1. app.py +10 -8
app.py CHANGED
@@ -9,7 +9,16 @@ import spaces
9
  import torch
10
  from transformers import VitMatteForImageMatting, VitMatteImageProcessor
11
 
12
- DESCRIPTION = "# [ViTMatte](https://github.com/hustvl/ViTMatte)"
 
 
 
 
 
 
 
 
 
13
 
14
  device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu")
15
 
@@ -117,13 +126,6 @@ def run(
117
 
118
  with gr.Blocks(css="style.css") as demo:
119
  gr.Markdown(DESCRIPTION)
120
- gr.Markdown(
121
- "This is the demo for [ViTMatte](https://github.com/hustvl/ViTMatte), an image matting application. You can matte any subject in a given image."
122
- )
123
- gr.Markdown(
124
- "If you wish to replace background of the image, simply select the checkbox and drag and drop your background image."
125
- )
126
- gr.Markdown("You can draw your own foreground mask and unknown (border) mask using the canvas.")
127
  gr.DuplicateButton(
128
  value="Duplicate Space for private use",
129
  elem_id="duplicate-button",
 
9
  import torch
10
  from transformers import VitMatteForImageMatting, VitMatteImageProcessor
11
 
12
+ DESCRIPTION = """\
13
+ # [ViTMatte](https://github.com/hustvl/ViTMatte)
14
+
15
+ This is the demo for [ViTMatte](https://github.com/hustvl/ViTMatte), an image matting application.
16
+ You can matte any subject in a given image.
17
+
18
+ If you wish to replace background of the image, simply select the checkbox and drag and drop your background image.
19
+
20
+ You can draw your own foreground mask and unknown (border) mask using the canvas.
21
+ """
22
 
23
  device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu")
24
 
 
126
 
127
  with gr.Blocks(css="style.css") as demo:
128
  gr.Markdown(DESCRIPTION)
 
 
 
 
 
 
 
129
  gr.DuplicateButton(
130
  value="Duplicate Space for private use",
131
  elem_id="duplicate-button",