Spaces:
Paused
Paused
Update app_gradio.py
Browse files- app_gradio.py +6 -6
app_gradio.py
CHANGED
@@ -179,15 +179,15 @@ def generate_output(image, apply_filter, prompt: str, num_seeds: int = 3, lambda
|
|
179 |
print("APPLYING FILTER")
|
180 |
# Apply filtering (assuming filter function is imported)
|
181 |
filtered_gifs = filter(generated_gifs, temp_image_path)
|
182 |
-
return filtered_gifs
|
183 |
else:
|
184 |
print("NOT APPLYING FILTER")
|
185 |
-
return generated_gifs
|
186 |
|
187 |
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)):
|
188 |
image = image['composite']
|
189 |
-
results = generate_output(image, apply_filter, prompt, num_seeds, lambda_value)
|
190 |
-
return results
|
191 |
|
192 |
css=""" """
|
193 |
|
@@ -349,7 +349,7 @@ with gr.Blocks(css=css) as demo:
|
|
349 |
num_seeds,
|
350 |
lambda_
|
351 |
],
|
352 |
-
outputs=output_gallery
|
353 |
)
|
354 |
def reload_pad():
|
355 |
blank_pad ={
|
@@ -374,7 +374,7 @@ with gr.Blocks(css=css) as demo:
|
|
374 |
draw_num_seeds,
|
375 |
draw_lambda_,
|
376 |
],
|
377 |
-
outputs=output_gallery
|
378 |
)
|
379 |
|
380 |
|
|
|
179 |
print("APPLYING FILTER")
|
180 |
# Apply filtering (assuming filter function is imported)
|
181 |
filtered_gifs = filter(generated_gifs, temp_image_path)
|
182 |
+
return filtered_gifs, filtered_gifs
|
183 |
else:
|
184 |
print("NOT APPLYING FILTER")
|
185 |
+
return generated_gifs, generated_gifs
|
186 |
|
187 |
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)):
|
188 |
image = image['composite']
|
189 |
+
results, results_to_download= generate_output(image, apply_filter, prompt, num_seeds, lambda_value)
|
190 |
+
return results, results_to_download
|
191 |
|
192 |
css=""" """
|
193 |
|
|
|
349 |
num_seeds,
|
350 |
lambda_
|
351 |
],
|
352 |
+
outputs=[output_gallery, download_gifs]
|
353 |
)
|
354 |
def reload_pad():
|
355 |
blank_pad ={
|
|
|
374 |
draw_num_seeds,
|
375 |
draw_lambda_,
|
376 |
],
|
377 |
+
outputs=[output_gallery, download_gifs]
|
378 |
)
|
379 |
|
380 |
|