Spaces:
Runtime error
Runtime error
Update app_gradio.py
Browse files- app_gradio.py +3 -1
app_gradio.py
CHANGED
|
@@ -23,6 +23,7 @@ from text2vid_modded import TextToVideoSDPipelineModded
|
|
| 23 |
from invert_utils import ddim_inversion as dd_inversion
|
| 24 |
from gifs_filter import filter
|
| 25 |
import subprocess
|
|
|
|
| 26 |
|
| 27 |
from huggingface_hub import snapshot_download
|
| 28 |
|
|
@@ -157,7 +158,8 @@ def process_video(num_frames, num_seeds, generator, exp_dir, load_name, caption,
|
|
| 157 |
|
| 158 |
def generate_output(image, apply_filter, prompt: str, num_seeds: int = 3, lambda_value: float = 0.5, progress=gr.Progress(track_tqdm=True)) -> List[str]:
|
| 159 |
"""Main function to generate output GIFs"""
|
| 160 |
-
|
|
|
|
| 161 |
os.makedirs(exp_dir, exist_ok=True)
|
| 162 |
|
| 163 |
# Save the input image temporarily
|
|
|
|
| 23 |
from invert_utils import ddim_inversion as dd_inversion
|
| 24 |
from gifs_filter import filter
|
| 25 |
import subprocess
|
| 26 |
+
import uuid
|
| 27 |
|
| 28 |
from huggingface_hub import snapshot_download
|
| 29 |
|
|
|
|
| 158 |
|
| 159 |
def generate_output(image, apply_filter, prompt: str, num_seeds: int = 3, lambda_value: float = 0.5, progress=gr.Progress(track_tqdm=True)) -> List[str]:
|
| 160 |
"""Main function to generate output GIFs"""
|
| 161 |
+
unique_id = str(uuid.uuid4())
|
| 162 |
+
exp_dir = f"static/app_tmp_{unique_id}"
|
| 163 |
os.makedirs(exp_dir, exist_ok=True)
|
| 164 |
|
| 165 |
# Save the input image temporarily
|