Spaces:
Running
on
Zero
Running
on
Zero
Boboiazumi
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -6,7 +6,7 @@ import gradio as gr
|
|
6 |
|
7 |
|
8 |
ROOP_DEFAULT_PATH = "media/roop_default.png"
|
9 |
-
|
10 |
|
11 |
|
12 |
def _handle_roop_solve(
|
@@ -20,7 +20,7 @@ def _handle_roop_solve(
|
|
20 |
if not os.path.exists("media"):
|
21 |
os.mkdir("media")
|
22 |
start_time = time.time()
|
23 |
-
command = f"python run.py -t {video_path} -s {img_path} -o {
|
24 |
os.system(command)
|
25 |
solved_time = time.time() - start_time
|
26 |
message = "Successfully solve the GED problem, using time ({:.3f}s).".format(solved_time)
|
@@ -71,10 +71,15 @@ with gr.Blocks() as ged_page:
|
|
71 |
with gr.Row(variant="panel"):
|
72 |
with gr.Column(scale=2):
|
73 |
with gr.Row():
|
74 |
-
upload_video = gr.
|
75 |
-
label="Upload .
|
76 |
-
|
|
|
77 |
)
|
|
|
|
|
|
|
|
|
78 |
upload_img = gr.Image(
|
79 |
label="Upload .png or .jpg File",
|
80 |
type="filepath",
|
|
|
6 |
|
7 |
|
8 |
ROOP_DEFAULT_PATH = "media/roop_default.png"
|
9 |
+
ROOP_OUTPUT_PATH = "media/roop_output.png"
|
10 |
|
11 |
|
12 |
def _handle_roop_solve(
|
|
|
20 |
if not os.path.exists("media"):
|
21 |
os.mkdir("media")
|
22 |
start_time = time.time()
|
23 |
+
command = f"python run.py -t {video_path} -s {img_path} -o {ROOP_OUTPUT_PATH} --execution-threads 64 --execution-provider gpu"
|
24 |
os.system(command)
|
25 |
solved_time = time.time() - start_time
|
26 |
message = "Successfully solve the GED problem, using time ({:.3f}s).".format(solved_time)
|
|
|
71 |
with gr.Row(variant="panel"):
|
72 |
with gr.Column(scale=2):
|
73 |
with gr.Row():
|
74 |
+
upload_video = gr.Image(
|
75 |
+
label="Upload .png or .jpg File",
|
76 |
+
type="filepath",
|
77 |
+
min_width=40,
|
78 |
)
|
79 |
+
#gr.Video(
|
80 |
+
# label="Upload .mp4 Vide0",
|
81 |
+
# format="mp4",
|
82 |
+
#)
|
83 |
upload_img = gr.Image(
|
84 |
label="Upload .png or .jpg File",
|
85 |
type="filepath",
|