Spaces:
Running
on
A10G
Running
on
A10G
bug fix
Browse files- __pycache__/app.cpython-38.pyc +0 -0
- app.py +10 -8
__pycache__/app.cpython-38.pyc
ADDED
|
Binary file (8.69 kB). View file
|
|
|
app.py
CHANGED
|
@@ -166,8 +166,8 @@ def run(*args):
|
|
| 166 |
|
| 167 |
def output_video_fn(video_path, text_prompt):
|
| 168 |
fold_path = os.path.join(os.path.dirname(os.path.abspath(__file__)), "example_videos")
|
| 169 |
-
video_path = os.path.join(fold_path, os.path.basename(video_path).replace('input', 'output'))
|
| 170 |
-
|
| 171 |
return video_path
|
| 172 |
|
| 173 |
block = gr.Blocks().queue()
|
|
@@ -185,7 +185,9 @@ with block:
|
|
| 185 |
interactive=False,
|
| 186 |
scale=5)
|
| 187 |
input_path.upload(lambda x:x, inputs=[input_path], outputs=[inputs])
|
| 188 |
-
|
|
|
|
|
|
|
| 189 |
with gr.Row():
|
| 190 |
example_input = gr.Video(label='Input Example',
|
| 191 |
format='mp4',
|
|
@@ -197,6 +199,7 @@ with block:
|
|
| 197 |
visible=True,
|
| 198 |
interactive=False)
|
| 199 |
# input(os.path.join(os.path.dirname(os.path.abspath(__file__)), "example_videos", "exp_input_1.mp4"))
|
|
|
|
| 200 |
ex_prompt = gr.Textbox(label='Text Prompt', interactive=False)
|
| 201 |
with gr.Row():
|
| 202 |
ex_list = []
|
|
@@ -225,7 +228,9 @@ with block:
|
|
| 225 |
interactive=False)
|
| 226 |
control_video = gr.Image(label='Control Video',
|
| 227 |
interactive=False)
|
| 228 |
-
|
|
|
|
|
|
|
| 229 |
with gr.Row():
|
| 230 |
preprocess_list = ['depth_zoe', 'lineart_realistic', 'lineart_standard', 'softedge_hed']
|
| 231 |
preprocess_name = gr.Dropdown(preprocess_list,
|
|
@@ -236,16 +241,13 @@ with block:
|
|
| 236 |
maximum=40,
|
| 237 |
step=0.1,
|
| 238 |
value=7.5)
|
| 239 |
-
with gr.Row():
|
| 240 |
seed = gr.Slider(label='Seed',
|
| 241 |
minimum=0,
|
| 242 |
maximum=2147483647,
|
| 243 |
step=1,
|
| 244 |
value=0,
|
| 245 |
randomize=True)
|
| 246 |
-
|
| 247 |
-
positive_prompts = gr.Textbox(label='Positive prompts')
|
| 248 |
-
negative_prompts = gr.Textbox(label='Negative prompts')
|
| 249 |
run_button = gr.Button(value='Run All')
|
| 250 |
with gr.Accordion('Configuration',
|
| 251 |
open=False):
|
|
|
|
| 166 |
|
| 167 |
def output_video_fn(video_path, text_prompt):
|
| 168 |
fold_path = os.path.join(os.path.dirname(os.path.abspath(__file__)), "example_videos")
|
| 169 |
+
video_path = os.path.join(fold_path, os.path.basename(video_path).replace('input', 'output')).replace('.mp4', '.gif')
|
| 170 |
+
|
| 171 |
return video_path
|
| 172 |
|
| 173 |
block = gr.Blocks().queue()
|
|
|
|
| 185 |
interactive=False,
|
| 186 |
scale=5)
|
| 187 |
input_path.upload(lambda x:x, inputs=[input_path], outputs=[inputs])
|
| 188 |
+
|
| 189 |
+
gr.Markdown('# Example Video Edits')
|
| 190 |
+
|
| 191 |
with gr.Row():
|
| 192 |
example_input = gr.Video(label='Input Example',
|
| 193 |
format='mp4',
|
|
|
|
| 199 |
visible=True,
|
| 200 |
interactive=False)
|
| 201 |
# input(os.path.join(os.path.dirname(os.path.abspath(__file__)), "example_videos", "exp_input_1.mp4"))
|
| 202 |
+
|
| 203 |
ex_prompt = gr.Textbox(label='Text Prompt', interactive=False)
|
| 204 |
with gr.Row():
|
| 205 |
ex_list = []
|
|
|
|
| 228 |
interactive=False)
|
| 229 |
control_video = gr.Image(label='Control Video',
|
| 230 |
interactive=False)
|
| 231 |
+
with gr.Row():
|
| 232 |
+
positive_prompts = gr.Textbox(label='Positive prompts')
|
| 233 |
+
negative_prompts = gr.Textbox(label='Negative prompts')
|
| 234 |
with gr.Row():
|
| 235 |
preprocess_list = ['depth_zoe', 'lineart_realistic', 'lineart_standard', 'softedge_hed']
|
| 236 |
preprocess_name = gr.Dropdown(preprocess_list,
|
|
|
|
| 241 |
maximum=40,
|
| 242 |
step=0.1,
|
| 243 |
value=7.5)
|
|
|
|
| 244 |
seed = gr.Slider(label='Seed',
|
| 245 |
minimum=0,
|
| 246 |
maximum=2147483647,
|
| 247 |
step=1,
|
| 248 |
value=0,
|
| 249 |
randomize=True)
|
| 250 |
+
|
|
|
|
|
|
|
| 251 |
run_button = gr.Button(value='Run All')
|
| 252 |
with gr.Accordion('Configuration',
|
| 253 |
open=False):
|