Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -275,7 +275,7 @@ def generate_caption(image, model_name='gokaygokay/Florence-2-Flux-Large'):
|
|
275 |
def process_and_save_image(height, width, steps, scales, prompt, seed):
|
276 |
is_safe, filtered_prompt = filter_prompt(prompt)
|
277 |
if not is_safe:
|
278 |
-
gr.Warning("
|
279 |
return None, load_gallery()
|
280 |
|
281 |
with torch.inference_mode(), torch.autocast("cuda", dtype=torch.bfloat16), timer("inference"):
|
|
|
275 |
def process_and_save_image(height, width, steps, scales, prompt, seed):
|
276 |
is_safe, filtered_prompt = filter_prompt(prompt)
|
277 |
if not is_safe:
|
278 |
+
gr.Warning("The prompt contains inappropriate content.")
|
279 |
return None, load_gallery()
|
280 |
|
281 |
with torch.inference_mode(), torch.autocast("cuda", dtype=torch.bfloat16), timer("inference"):
|