Spaces:
Paused
Paused
Update app_gradio.py
Browse files- app_gradio.py +4 -7
app_gradio.py
CHANGED
@@ -175,16 +175,13 @@ def generate_output(image, apply_filter, prompt: str, num_seeds: int = 3, lambda
|
|
175 |
lambda_=1 - lambda_value
|
176 |
)
|
177 |
|
178 |
-
# Apply filtering (assuming filter function is imported)
|
179 |
-
print("APPLYING FILTERS")
|
180 |
-
filtered_gifs = filter(generated_gifs, temp_image_path)
|
181 |
-
|
182 |
if apply_filter == True:
|
183 |
print("APPLYING FILTER")
|
|
|
|
|
184 |
else:
|
185 |
print("NOT APPLYING FILTER")
|
186 |
-
|
187 |
-
return filtered_gifs
|
188 |
|
189 |
def generate_output_from_sketchpad(image, apply_filter, prompt: str, num_seeds: int = 3, lambda_value: float = 0.5, progress=gr.Progress(track_tqdm=True)):
|
190 |
image = image['composite']
|
@@ -314,7 +311,7 @@ with gr.Blocks(css=css) as demo:
|
|
314 |
label="Motion Strength"
|
315 |
)
|
316 |
draw_apply_filter = gr.Checkbox(
|
317 |
-
label="
|
318 |
value=False
|
319 |
)
|
320 |
|
|
|
175 |
lambda_=1 - lambda_value
|
176 |
)
|
177 |
|
|
|
|
|
|
|
|
|
178 |
if apply_filter == True:
|
179 |
print("APPLYING FILTER")
|
180 |
+
# Apply filtering (assuming filter function is imported)
|
181 |
+
return filtered_gifs = filter(generated_gifs, temp_image_path)
|
182 |
else:
|
183 |
print("NOT APPLYING FILTER")
|
184 |
+
return generated_gifs
|
|
|
185 |
|
186 |
def generate_output_from_sketchpad(image, apply_filter, prompt: str, num_seeds: int = 3, lambda_value: float = 0.5, progress=gr.Progress(track_tqdm=True)):
|
187 |
image = image['composite']
|
|
|
311 |
label="Motion Strength"
|
312 |
)
|
313 |
draw_apply_filter = gr.Checkbox(
|
314 |
+
label="Apply GIFs Filters",
|
315 |
value=False
|
316 |
)
|
317 |
|