Spaces:
Paused
Paused
call video matting anything infunction instead of during build
Browse files
app.py
CHANGED
@@ -11,8 +11,6 @@ import gradio as gr
|
|
11 |
|
12 |
from gradio_client import Client, handle_file
|
13 |
|
14 |
-
matte_client = Client("fffiloni/Video-Matting-Anything")
|
15 |
-
|
16 |
# execute a CLI command
|
17 |
def execute_command(command: str) -> None:
|
18 |
subprocess.run(command, check=True)
|
@@ -164,7 +162,7 @@ def get_frames(video_in, img_type):
|
|
164 |
|
165 |
def get_matte(video_in, subject_to_remove):
|
166 |
print("Trying to call video matting")
|
167 |
-
|
168 |
result = matte_client.predict(
|
169 |
video_in={"video":handle_file(video_in)},
|
170 |
trim_value=10,
|
|
|
11 |
|
12 |
from gradio_client import Client, handle_file
|
13 |
|
|
|
|
|
14 |
# execute a CLI command
|
15 |
def execute_command(command: str) -> None:
|
16 |
subprocess.run(command, check=True)
|
|
|
162 |
|
163 |
def get_matte(video_in, subject_to_remove):
|
164 |
print("Trying to call video matting")
|
165 |
+
matte_client = Client("fffiloni/Video-Matting-Anything")
|
166 |
result = matte_client.predict(
|
167 |
video_in={"video":handle_file(video_in)},
|
168 |
trim_value=10,
|