Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
|
@@ -159,27 +159,28 @@ def gradio_interface():
|
|
| 159 |
</a>
|
| 160 |
</div>
|
| 161 |
""")
|
| 162 |
-
with gr.
|
| 163 |
-
|
| 164 |
-
|
| 165 |
-
|
| 166 |
-
|
| 167 |
-
|
| 168 |
-
|
| 169 |
-
|
| 170 |
-
|
| 171 |
-
|
| 172 |
-
|
| 173 |
-
|
| 174 |
-
submit_button = gr.Button("Process")
|
| 175 |
|
| 176 |
-
|
| 177 |
-
|
| 178 |
-
|
| 179 |
-
examples_per_page = 4
|
| 180 |
-
)
|
| 181 |
|
| 182 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 183 |
|
| 184 |
submit_button.click(process_image, inputs=[input_image, remove_bg], outputs=[output_video])
|
| 185 |
|
|
|
|
| 159 |
</a>
|
| 160 |
</div>
|
| 161 |
""")
|
| 162 |
+
with gr.Group()
|
| 163 |
+
with gr.Row():
|
| 164 |
+
with gr.Column(scale=2):
|
| 165 |
+
|
| 166 |
+
input_image = gr.Image(
|
| 167 |
+
label="Image input",
|
| 168 |
+
type="pil",
|
| 169 |
+
image_mode="RGBA",
|
| 170 |
+
height=240
|
| 171 |
+
)
|
| 172 |
+
|
| 173 |
+
remove_bg = gr.Checkbox(label="Need to remove BG ?", value=False)
|
|
|
|
| 174 |
|
| 175 |
+
submit_button = gr.Button("Process")
|
| 176 |
+
|
| 177 |
+
output_video= gr.Video(label="Output Video", scale=4)
|
|
|
|
|
|
|
| 178 |
|
| 179 |
+
gr.Examples(
|
| 180 |
+
examples = examples_folder,
|
| 181 |
+
inputs = [input_image],
|
| 182 |
+
examples_per_page = 11
|
| 183 |
+
)
|
| 184 |
|
| 185 |
submit_button.click(process_image, inputs=[input_image, remove_bg], outputs=[output_video])
|
| 186 |
|