Spaces:
Sleeping
Sleeping
Yaron Koresh
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -52,7 +52,6 @@ adapter = MotionAdapter.from_pretrained("guoyww/animatediff-motion-adapter-v1-5-
|
|
52 |
# variable data
|
53 |
|
54 |
last_motion=""
|
55 |
-
result = []
|
56 |
|
57 |
# precision data
|
58 |
|
@@ -248,18 +247,14 @@ def handle_generate(*_inp):
|
|
248 |
|
249 |
""")
|
250 |
|
251 |
-
|
252 |
-
pipe_out = [pipe_generate(*inp) for i in range(ln)]
|
253 |
|
254 |
-
|
255 |
-
|
256 |
-
name
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
export_to_gif(i,name,fps=fps)
|
261 |
-
names.append( name )
|
262 |
-
return names
|
263 |
|
264 |
def ui():
|
265 |
global result
|
@@ -319,7 +314,7 @@ def ui():
|
|
319 |
interactive=True
|
320 |
)
|
321 |
with gr.Row():
|
322 |
-
result
|
323 |
with gr.Row():
|
324 |
run_button = gr.Button("Start!",elem_classes="btn",scale=0)
|
325 |
|
|
|
52 |
# variable data
|
53 |
|
54 |
last_motion=""
|
|
|
55 |
|
56 |
# precision data
|
57 |
|
|
|
247 |
|
248 |
""")
|
249 |
|
250 |
+
pipe_out = pipe_generate(*inp)
|
|
|
251 |
|
252 |
+
name = generate_random_string(12) + ( ".png" if time == 0 else ".gif" )
|
253 |
+
if inp[4] == 0.0:
|
254 |
+
pipeout.save(name)
|
255 |
+
else:
|
256 |
+
export_to_gif(pipeout,name,fps=fps)
|
257 |
+
return name
|
|
|
|
|
|
|
258 |
|
259 |
def ui():
|
260 |
global result
|
|
|
314 |
interactive=True
|
315 |
)
|
316 |
with gr.Row():
|
317 |
+
result = gr.Image(interactive=False,elem_classes="image-container", label="Result", show_label=True, type='filepath', show_share_button=False)
|
318 |
with gr.Row():
|
319 |
run_button = gr.Button("Start!",elem_classes="btn",scale=0)
|
320 |
|