Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -363,7 +363,7 @@ def save_video_to_local(video_path):
|
|
363 |
shutil.copyfile(video_path, filename)
|
364 |
return filename
|
365 |
|
366 |
-
@spaces.GPU
|
367 |
def generate(image1, video, textbox_in, first_run, state, images_tensor):
|
368 |
flag = 1
|
369 |
|
@@ -393,7 +393,7 @@ def generate(image1, video, textbox_in, first_run, state, images_tensor):
|
|
393 |
show_images = textbox_in + "\n" + show_images
|
394 |
state.append_message(output, input_prompt, prompt, show_images)
|
395 |
|
396 |
-
torch.cuda.empty_cache()
|
397 |
|
398 |
return (state, state.to_gradio_chatbot(show_images, output), False, gr.update(value=None, interactive=True), images_tensor, gr.update(value=image1 if os.path.exists(image1) else None, interactive=True), gr.update(value=video if os.path.exists(video) else None, interactive=True))
|
399 |
|
|
|
363 |
shutil.copyfile(video_path, filename)
|
364 |
return filename
|
365 |
|
366 |
+
# @spaces.GPU
|
367 |
def generate(image1, video, textbox_in, first_run, state, images_tensor):
|
368 |
flag = 1
|
369 |
|
|
|
393 |
show_images = textbox_in + "\n" + show_images
|
394 |
state.append_message(output, input_prompt, prompt, show_images)
|
395 |
|
396 |
+
# torch.cuda.empty_cache()
|
397 |
|
398 |
return (state, state.to_gradio_chatbot(show_images, output), False, gr.update(value=None, interactive=True), images_tensor, gr.update(value=image1 if os.path.exists(image1) else None, interactive=True), gr.update(value=video if os.path.exists(video) else None, interactive=True))
|
399 |
|